Skip to content

Commit

Permalink
Merge pull request #108 from yv/bugfix/warning-on-missing-model
Browse files Browse the repository at this point in the history
display traceback when model is not found
  • Loading branch information
alattner committed Jun 23, 2019
2 parents f3a4372 + 4124da5 commit 11a6e02
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions palladium/persistence.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
""":class:`~palladium.interfaces.ModelPersister` implementations.
"""

import logging
from abc import abstractmethod
import base64
from contextlib import contextmanager
Expand Down Expand Up @@ -628,7 +628,8 @@ def update_cache(self, *args, **kwargs):

try:
model = self.impl.read(*args, **kwargs)
except LookupError:
except LookupError as ex:
logging.exception("Cannot find model version")
model = None
if model is not None:
self.cache[self.__pld_config_key__] = model
Expand Down

0 comments on commit 11a6e02

Please sign in to comment.