Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible bug instantiating chest with data #6

Closed
cowlicks opened this issue Dec 27, 2015 · 1 comment
Closed

Possible bug instantiating chest with data #6

cowlicks opened this issue Dec 27, 2015 · 1 comment

Comments

@cowlicks
Copy link
Contributor

Maybe I'm not using Chest right

>>> from chest import Chest
>>> c = Chest({'k': 6})
>>> assert 'k' in c
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AssertionError
@mrocklin
Copy link
Owner

Yup, looks like in these lines

        self.inmem = data or dict()
        # A set of keys held both in memory or on disk
        self._keys = {}

We need to dump set(data) into self_keys if data is not None

mrocklin added a commit that referenced this issue Jan 7, 2016
Properly manage keys from initial data.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants