sibblegp / b2blaze

b2blaze
MIT License
607 stars 32 forks source link

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

Closed mitchellhuang closed 6 years ago

mitchellhuang commented 6 years ago

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 commented 6 years ago

Thanks for this!

sibblegp commented 6 years ago

Fixed in 0.1.10