[Freeipa-devel] [PATCH 0386] private_ccache: Harden the removal of KRB5CCNAME env variable
Jan Cholasta
jcholast at redhat.com
Mon Nov 23 12:11:07 UTC 2015
On 23.11.2015 12:53, Tomas Babej wrote:
> Hi,
>
> If the code within the private_ccache contextmanager does not
> set/removes the KRB5CCNAME, the pop method will raise KeyError, which
> will cause unnecessary termination of the code flow.
>
> Make sure the KRB5CCNAME is popped out of os.environ only if present.
>
> Tomas
NACK, use os.environ.pop('KRB5CCNAME', None) to safely remove it.
Also I don't think the comment is necessary, it's quite obvious what the
code does.
--
Jan Cholasta
More information about the Freeipa-devel
mailing list