Skip to content

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

@sqlalchemy-bot

Description

@sqlalchemy-bot

Migrated issue, originally created by Mark (mhall)

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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions