From caca181d3b73c045abd72e464a195c6b61c251c7 Mon Sep 17 00:00:00 2001 From: Fraser Tweedale Date: Jan 31 2017 17:45:32 +0000 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 --- diff --git a/ipapython/ipautil.py b/ipapython/ipautil.py index c8f87ef..c810adc 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