diff --git a/pytools/persistent_dict.py b/pytools/persistent_dict.py index 741afb69bdb59c34cfd244857b1f6296f3e3cf7a..89a2ebfae0c5fd8fa6cb78d9db80b50a67ee25a9 100644 --- a/pytools/persistent_dict.py +++ b/pytools/persistent_dict.py @@ -642,8 +642,9 @@ class WriteOncePersistentDict(_PersistentDictBase): self._warn("pytools.persistent_dict.WriteOncePersistentDict(%s) " "encountered an invalid " "key file for key %s. Remove the directory " - "'%s' if necessary. (caught: %s)" - % (self.identifier, hexdigest_key, item_dir, str(e)), + "'%s' if necessary. (caught: %s: %s)" + % (self.identifier, hexdigest_key, item_dir, + type(e).__name__, str(e)), stacklevel=1 + _stacklevel) raise NoSuchEntryError(key)