summaryrefslogtreecommitdiffstats
path: root/ipa-python/ipaclient.py
diff options
context:
space:
mode:
authorKarl MacMillan <kmacmill@redhat.com>2007-10-19 15:01:38 -0400
committerKarl MacMillan <kmacmill@redhat.com>2007-10-19 15:01:38 -0400
commit1685751b1cd67191793f103afe340be540842b1e (patch)
tree217c9551495fd5c22b15926332b051724a731080 /ipa-python/ipaclient.py
parent5e651a6496848f5ee3f6415ef3b56ca140c88556 (diff)
downloadfreeipa-1685751b1cd67191793f103afe340be540842b1e.tar.gz
freeipa-1685751b1cd67191793f103afe340be540842b1e.tar.xz
freeipa-1685751b1cd67191793f103afe340be540842b1e.zip
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.
Diffstat (limited to 'ipa-python/ipaclient.py')
-rw-r--r--ipa-python/ipaclient.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/ipa-python/ipaclient.py b/ipa-python/ipaclient.py
index 7131be48c..b9439ecd6 100644
--- a/ipa-python/ipaclient.py
+++ b/ipa-python/ipaclient.py
@@ -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):