We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 3a7c440 + 9be5156 commit e5a5c36Copy full SHA for e5a5c36
1 file changed
apitools/base/py/credentials_lib.py
@@ -14,7 +14,11 @@
14
import oauth2client.multistore_file
15
import oauth2client.tools
16
17
-import gflags as flags
+try:
18
+ from gflags import FLAGS
19
+except ImportError:
20
+ FLAGS = None
21
+
22
import logging
23
24
from apitools.base.py import exceptions
@@ -192,8 +196,8 @@ def CredentialsFromFile(path, client_info):
192
196
client_info['client_id'],
193
197
client_info['user_agent'],
194
198
client_info['scope'])
195
- if hasattr(flags.FLAGS, 'auth_local_webserver'):
- flags.FLAGS.auth_local_webserver = False
199
+ if hasattr(FLAGS, 'auth_local_webserver'):
200
+ FLAGS.auth_local_webserver = False
201
credentials = credential_store.get()
202
if credentials is None or credentials.invalid:
203
print 'Generating new OAuth credentials ...'
0 commit comments