From caca181d3b73c045abd72e464a195c6b61c251c7 Mon Sep 17 00:00:00 2001 From: Fraser Tweedale Date: Wed, 25 Jan 2017 10:51:24 +1000 Subject: 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 --- ipapython/ipautil.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ipapython') 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 -- cgit