X-Git-Url: https://wannabe.guru.org/gitweb/?a=blobdiff_plain;f=persistent.py;h=83e6900cc18471ae44503a14f3184a2827420190;hb=55a3172e37855f388b9ba0dfc91641a6c9ad1376;hp=2751572553ac7c20c7663974c13e17b13f0ab037;hpb=ffc4022c1ea2c2a5892150ff55e6c9a9ddbb8756;p=python_utils.git 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: