From d0d941cc86073017583c0e548b06635fcb88dae0 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Wed, 10 Aug 2016 18:56:08 -0500 Subject: [PATCH] Promote key collisions in persistent_dict to warnings --- pytools/persistent_dict.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pytools/persistent_dict.py b/pytools/persistent_dict.py index 524c952..e362d2e 100644 --- a/pytools/persistent_dict.py +++ b/pytools/persistent_dict.py @@ -365,7 +365,11 @@ class PersistentDict(object): if read_key != key: # Key collision, oh well. - logger.info("%s: key collision in cache at '%s'" + from warnings import warn + warn("%s: key collision in cache at '%s' -- these are " + "sufficiently unlikely that they're often " + "indicative of a broken implementation " + "of equality comparison" % (self.identifier, self.container_dir)) raise NoSuchEntryError(key) -- GitLab