diff options
author | Rob Crittenden <rcritten@redhat.com> | 2010-09-10 15:57:40 -0400 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2010-09-10 17:04:01 -0400 |
commit | 67a454951993b1f04f3feeab7462dcaf6d23fb61 (patch) | |
tree | 58f78ff79f90c501a5756d013a55e4c0874f22a0 /ipalib/util.py | |
parent | a091be064d86625a3c3d9152441758819043151e (diff) | |
download | freeipa-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 'ipalib/util.py')
-rw-r--r-- | ipalib/util.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ipalib/util.py b/ipalib/util.py index 4aff88f83..6bd1da541 100644 --- a/ipalib/util.py +++ b/ipalib/util.py @@ -25,7 +25,6 @@ import os import imp import logging import time -import krbV import socket from types import NoneType @@ -49,7 +48,11 @@ def json_serialize(obj): def get_current_principal(): try: + # krbV isn't necessarily available on client machines, fail gracefully + import krbV return unicode(krbV.default_context().default_ccache().principal().name) + except ImportError: + raise RuntimeError('python-krbV is not available.') except krbV.Krb5Error: #TODO: do a kinit? raise errors.CCacheError() |