summaryrefslogtreecommitdiff
path: root/persistent.py
diff options
context:
space:
mode:
Diffstat (limited to 'persistent.py')
-rw-r--r--persistent.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/persistent.py b/persistent.py
index f6ca0a0..2751572 100644
--- a/persistent.py
+++ b/persistent.py
@@ -7,6 +7,7 @@ import enum
import functools
import logging
from typing import Any
+import warnings
import file_utils
@@ -143,7 +144,9 @@ class persistent_autoloaded_singleton(object):
logger.debug(f'Attempting to load {cls.__name__} from persisted state.')
self.instance = cls.load()
if not self.instance:
- logger.warning('Loading from cache failed.')
+ msg = 'Loading from cache failed.'
+ logger.warning(msg)
+ warnings.warn(msg)
logger.debug(f'Attempting to instantiate {cls.__name__} directly.')
self.instance = cls(*args, **kwargs)
else: