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

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