From 67a454951993b1f04f3feeab7462dcaf6d23fb61 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Fri, 10 Sep 2010 15:57:40 -0400 Subject: 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 --- ipapython/config.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'ipapython') diff --git a/ipapython/config.py b/ipapython/config.py index f3532c47..12d916cf 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 -- cgit