From fd3a72ce2f3042cf5c93680b81f8933b32fda52f Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Thu, 20 Feb 2014 16:28:14 -0600 Subject: [PATCH] Log debugging message in case of key collision in PersistentDict --- pytools/persistent_dict.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pytools/persistent_dict.py b/pytools/persistent_dict.py index 15732c3..984dcfc 100644 --- a/pytools/persistent_dict.py +++ b/pytools/persistent_dict.py @@ -24,6 +24,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ +import logging +logger = logging.getLogger(__name__) + + import sys import os @@ -339,6 +343,8 @@ class PersistentDict(object): if read_key != key: # Key collision, oh well. + logger.debug("key collsion in cache at '%s'" + % self.container_dir) raise NoSuchEntryError(key) # {{{ load value -- GitLab