diff options
author | Fraser Tweedale <ftweedal@redhat.com> | 2017-01-31 11:23:58 +1000 |
---|---|---|
committer | Martin Basti <mbasti@redhat.com> | 2017-02-06 17:28:39 +0100 |
commit | 924794f62b9d3d0f46ca18e4f9338eaed865c03e (patch) | |
tree | a3fac806139ec2310bc1aab226cdf8a2838e6857 /ipalib | |
parent | f4088b3a00b3cbd1a0133ac90cba85e501573f76 (diff) | |
download | freeipa-924794f62b9d3d0f46ca18e4f9338eaed865c03e.tar.gz freeipa-924794f62b9d3d0f46ca18e4f9338eaed865c03e.tar.xz freeipa-924794f62b9d3d0f46ca18e4f9338eaed865c03e.zip |
Fix reference before assignment
In 'store_session_cookie', if the server does not set the session
cookie for some reason, the 'session_cookie' variable does not get
assigned, resulting in UnboundLocalError. Set an initial value of
'None'.
Fixes: https://fedorahosted.org/freeipa/ticket/6636
Reviewed-By: Martin Basti <mbasti@redhat.com>
Diffstat (limited to 'ipalib')
-rw-r--r-- | ipalib/rpc.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ipalib/rpc.py b/ipalib/rpc.py index fb739f8f4..356ec4229 100644 --- a/ipalib/rpc.py +++ b/ipalib/rpc.py @@ -706,6 +706,7 @@ class KerbTransport(SSLTransport): cookie_header = [cookie_header] # Search for the session cookie + session_cookie = None try: for cookie in cookie_header: session_cookie = \ |