summaryrefslogtreecommitdiffstats
path: root/ipapython
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2010-09-10 15:57:40 -0400
committerRob Crittenden <rcritten@redhat.com>2010-09-10 17:04:01 -0400
commit67a454951993b1f04f3feeab7462dcaf6d23fb61 (patch)
tree58f78ff79f90c501a5756d013a55e4c0874f22a0 /ipapython
parenta091be064d86625a3c3d9152441758819043151e (diff)
downloadfreeipa-67a454951993b1f04f3feeab7462dcaf6d23fb61.tar.gz
freeipa-67a454951993b1f04f3feeab7462dcaf6d23fb61.tar.xz
freeipa-67a454951993b1f04f3feeab7462dcaf6d23fb61.zip
Remove some additional instances of krbV from ipa-client
Make two krbV imports conditional. These aren't used during a client install so should cause no problems. Also fix the client installer to use the new env option in ipautil.run. We weren't getting the krb5 configuration set in the environment because we were overriding the environment to set the PATH. ticket 136
Diffstat (limited to 'ipapython')
-rw-r--r--ipapython/config.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/ipapython/config.py b/ipapython/config.py
index f3532c479..12d916cff 100644
--- a/ipapython/config.py
+++ b/ipapython/config.py
@@ -20,7 +20,6 @@
import ConfigParser
from optparse import OptionParser, IndentedHelpFormatter
-import krbV
import socket
import ipapython.dnsclient
import re
@@ -113,8 +112,13 @@ def __discover_config(discover_server = True):
rl = 0
try:
if not config.default_realm:
- krbctx = krbV.default_context()
- config.default_realm = krbctx.default_realm
+ try:
+ # only import krbV when we need it
+ import krbV
+ krbctx = krbV.default_context()
+ config.default_realm = krbctx.default_realm
+ except ImportError:
+ pass
if not config.default_realm:
return False