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>
This commit is contained in:
Fraser Tweedale authored and Martin Basti committed 2017-02-06 17:28:39 +01:00
1 parent f4088b3a00
commit 924794f62b
1 file changed
+1
+1
View File
@@ -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 = \