summaryrefslogtreecommitdiffstats
path: root/ipapython
diff options
context:
space:
mode:
authorFraser Tweedale <ftweedal@redhat.com>2017-01-25 10:51:24 +1000
committerMartin Basti <mbasti@redhat.com>2017-01-31 18:45:32 +0100
commitcaca181d3b73c045abd72e464a195c6b61c251c7 (patch)
treef53f44864319f871b07b68f4044d9c64a236fe37 /ipapython
parent980c8a5f9e4ccbcd3c11def9cab33d0e61e945ae (diff)
downloadfreeipa-caca181d3b73c045abd72e464a195c6b61c251c7.tar.gz
freeipa-caca181d3b73c045abd72e464a195c6b61c251c7.tar.xz
freeipa-caca181d3b73c045abd72e464a195c6b61c251c7.zip
private_ccache: yield ccache name
When using private_ccache, yield 'path' from the context manager. This is cleaner than inspecting 'os.environ['KRB5CCNAME']' within the context. Part of: https://fedorahosted.org/freeipa/ticket/5011 Reviewed-By: Martin Basti <mbasti@redhat.com>
Diffstat (limited to 'ipapython')
-rw-r--r--ipapython/ipautil.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ipapython/ipautil.py b/ipapython/ipautil.py
index c8f87ef5b..c810adcd3 100644
--- a/ipapython/ipautil.py
+++ b/ipapython/ipautil.py
@@ -1300,7 +1300,7 @@ def private_ccache(path=None):
os.environ['KRB5CCNAME'] = path
try:
- yield
+ yield path
finally:
if original_value is not None:
os.environ['KRB5CCNAME'] = original_value