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

Fix some sqlite backend mistakes #212

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

RozeFound
Copy link

  1. or converts anything to boolean, so there self._connection is always True or False basically
  2. Since self._connection setup only happens if user makes request, and calls store or retrieve, there always a possibility that this code won't be called, and self._connection will stay null. Which will cause exception (thanks to assert) in pretty normal scenario

@karpetrosyan
Copy link
Owner

or converts anything to boolean, so there self._connection is always True or False basically

Don't really understand this line...

Example:

>>> object() or False
<object object at 0x71b11d2e8800>

If bool(connection) is True, it takes the connection object, if not, it will create a new one.

@RozeFound
Copy link
Author

Huh? Now that's confusing

@RozeFound
Copy link
Author

The more you live the more you learn I guess.

@RozeFound
Copy link
Author

What's wrong with this tests?

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

Successfully merging this pull request may close these issues.

None yet

2 participants