mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-11 08:41:55 -06:00
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>
This commit is contained in:
parent
980c8a5f9e
commit
caca181d3b
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user