pgreco / rpms / ipa

Forked from forks/areguera/rpms/ipa 4 years ago
Clone

Blame SOURCES/0081-Add-debug-log-in-case-cookie-retrieval-went-wrong.patch

ac7d03
From 6a66a69f4500fc8b324f3f3f0f0a4d79ea3fbe1e Mon Sep 17 00:00:00 2001
ac7d03
From: Stanislav Laznicka <slaznick@redhat.com>
ac7d03
Date: Fri, 17 Mar 2017 08:55:30 +0100
ac7d03
Subject: [PATCH] Add debug log in case cookie retrieval went wrong
ac7d03
ac7d03
https://pagure.io/freeipa/issue/6774
ac7d03
ac7d03
Reviewed-By: Martin Basti <mbasti@redhat.com>
ac7d03
---
ac7d03
 ipalib/rpc.py | 5 ++++-
ac7d03
 1 file changed, 4 insertions(+), 1 deletion(-)
ac7d03
ac7d03
diff --git a/ipalib/rpc.py b/ipalib/rpc.py
ac7d03
index 5c49bd2456b7e564043a886c840fa2678060f9e3..e23ca3d061645b2695a9e0deaa0b7d666f986e0e 100644
ac7d03
--- a/ipalib/rpc.py
ac7d03
+++ b/ipalib/rpc.py
ac7d03
@@ -895,7 +895,10 @@ class RPCClient(Connectible):
ac7d03
             session_cookie = Cookie.get_named_cookie_from_string(
ac7d03
                 cookie_string, COOKIE_NAME,
ac7d03
                 timestamp=datetime.datetime.utcnow())
ac7d03
-        except Exception:
ac7d03
+        except Exception as e:
ac7d03
+            self.log.debug(
ac7d03
+                'Error retrieving cookie from the persistent storage: {err}'
ac7d03
+                .format(err=e))
ac7d03
             return None
ac7d03
 
ac7d03
         return session_cookie
ac7d03
-- 
ac7d03
2.12.2
ac7d03