Remove dependency between ipa-pyton and ipa-server

Current ipa-python imports and calls code from ipaserver (which is in
the ipa-server package). This makes it impossible to use the admin
tools or the ipa-python package on a system without the server bits
installed. This fixes that in a fairly minimal way.
This commit is contained in:
Karl MacMillan
-
parent 5e651a6496
commit 1685751b1c
2 changed files with 8 additions and 9 deletions

View File

@@ -20,10 +20,7 @@
#!/usr/bin/python
import sys
if "/usr/share/ipa" not in sys.path:
sys.path.append("/usr/share/ipa")
from ipaserver import funcs
import ipa.rpcclient as rpcclient
import entity
import user
@@ -33,12 +30,12 @@ import config
class IPAClient:
def __init__(self,local=None):
self.local = local
if local:
self.transport = funcs.IPAServer()
# client needs to call set_principal(user@REALM)
def __init__(self,transport=None):
if transport:
self.local = True
self.transport = transport
else:
self.local = False
self.transport = rpcclient.RPCClient()
def set_principal(self,princ):