summaryrefslogtreecommitdiff
path: root/persistent.py
diff options
context:
space:
mode:
authorScott <[email protected]>2022-01-12 09:06:29 -0800
committerScott <[email protected]>2022-01-12 09:06:29 -0800
commit55a3172e37855f388b9ba0dfc91641a6c9ad1376 (patch)
tree01285a4abb59103ec437375d1133f9d00caa1497 /persistent.py
parentffc4022c1ea2c2a5892150ff55e6c9a9ddbb8756 (diff)
Scale back warnings.warn and add stacklevels= where appropriate.
Diffstat (limited to 'persistent.py')
-rw-r--r--persistent.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/persistent.py b/persistent.py
index 2751572..83e6900 100644
--- a/persistent.py
+++ b/persistent.py
@@ -146,7 +146,7 @@ class persistent_autoloaded_singleton(object):
if not self.instance:
msg = 'Loading from cache failed.'
logger.warning(msg)
- warnings.warn(msg)
+ warnings.warn(msg, stacklevel=2)
logger.debug(f'Attempting to instantiate {cls.__name__} directly.')
self.instance = cls(*args, **kwargs)
else: