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

[Major bug] Fix self.authorized return if we need to self._authorize #16

Merged
merged 1 commit into from
Aug 9, 2018

Conversation

mitchellhuang
Copy link
Contributor

@mitchellhuang mitchellhuang commented Aug 9, 2018

If we need to re-authorize (after 23 hrs), self._authorize works fine and self.auth_token is refreshed but we end up not returning anything in self.authorized!

If nothing is returned, Python defaults to None. This will cause make_request to raise B2AuthorizationError('Unknown Error') whenever we need to re-authorize because if self.authorized evaluates to False.

I would say this is a pretty major bug because if you are instantiating B2 once on startup, after 23 hrs passes and we need to re-authorize for a new request, make_request will fail.

@sibblegp sibblegp merged commit 450c244 into sibblegp:master Aug 9, 2018
@sibblegp
Copy link
Owner

sibblegp commented Aug 9, 2018

Thanks for this!

@sibblegp
Copy link
Owner

sibblegp commented Aug 9, 2018

Fixed in 0.1.10

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