Skip to content
This repository has been archived by the owner on Jan 18, 2025. It is now read-only.

Improper variable assignment appears when using --noauth_local_webserver #303

Closed
jaggedsoft opened this issue Sep 11, 2015 · 3 comments
Closed

Comments

@jaggedsoft
Copy link

Latest pip installed version of oauth2client
This problem perplexed me for some time, but I managed to figure out what was causing it.
I was using the python example from https://developers.google.com/youtube/v3/docs/thumbnails/set
When I set the flag --noauth_local_webserver I would get the error UnboundLocalError: local variable 'success' referenced before assignment

The problem appears in oauth2client\tools.py line 167. success = False needs to be moved up above this statement: if not flags.noauth_local_webserver: to line 166. Problem solved. Anywho, thank you guys for your hard work. This api is amazing

root@nextlocal:~# pip show oauth2client

Metadata-Version: 2.0
Name: oauth2client
Version: 1.5.0
Summary: OAuth 2.0 client library
Home-page: http://github.com/google/oauth2client/
Author: Google Inc.
Author-email: UNKNOWN
License: Apache 2.0
Location: /usr/local/lib/python2.7/dist-packages
Requires: six, pyasn1-modules, rsa, pyasn1, httplib2

@dhermes
Copy link
Contributor

dhermes commented Sep 11, 2015

Thanks for tracking down! This was fixed in #301

@nathanielmanistaatgoogle Should we cut a new release?

@nathanielmanistaatgoogle
Copy link
Contributor

@dhermes: yes, absolutely.

@dhermes
Copy link
Contributor

dhermes commented Sep 14, 2015

I created #304, will address this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants