Calling region.get with a key with no value throws an exception

Issue #8 resolved
Mark
created an issue

If I call region.get('missing_key'), then I get the following exception:

File "/home/mhall/Projects/workspace/Storyana/src/storyana/backend.py", line 175, in has_story

return region.get(page_name) != api.NO_VALUE

File "/home/mhall/Projects/workspace/Storyana/virtualenv/local/lib/python2.7/site-packages/dogpile/cache/region.py", line 272, in get time.time() - value.metadata["ct"] > expiration_time:

AttributeError: 'NoValue' object has no attribute 'metadata'

Comments (3)

  1. Log in to comment