URL: https://github.com/freeipa/freeipa/pull/611
Author: stlaz
 Title: #611: Add debug log in case cookie retrieval went wrong
Action: opened

PR body:
"""
When backporting the fix, @MartinBasti pointed out we could use a debug log.

https://pagure.io/freeipa/issue/6774
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/611/head:pr611
git checkout pr611
From b5d89e324af72493aac7e8b601a0136f8537236a Mon Sep 17 00:00:00 2001
From: Stanislav Laznicka <slazn...@redhat.com>
Date: Fri, 17 Mar 2017 08:55:30 +0100
Subject: [PATCH] Add debug log in case cookie retrieval went wrong

https://pagure.io/freeipa/issue/6774
---
 ipalib/rpc.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/ipalib/rpc.py b/ipalib/rpc.py
index 16ffb8b..499ddeb 100644
--- a/ipalib/rpc.py
+++ b/ipalib/rpc.py
@@ -849,7 +849,10 @@ def get_session_cookie_from_persistent_storage(self, principal):
             session_cookie = Cookie.get_named_cookie_from_string(
                 cookie_string, COOKIE_NAME,
                 timestamp=datetime.datetime.utcnow())
-        except Exception:
+        except Exception as e:
+            self.log.debug(
+                'Error retrieving cookie from the persistent storage: {err}'
+                .format(err=e))
             return None
 
         return session_cookie
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to