Compare commits
1 commit
Author | SHA1 | Date | |
---|---|---|---|
f47cfa6614 |
1 changed files with 3 additions and 0 deletions
|
@ -29,8 +29,11 @@ class Google():
|
||||||
self.credentials = None
|
self.credentials = None
|
||||||
|
|
||||||
def login(self):
|
def login(self):
|
||||||
|
print('token_file =', self.token_file)
|
||||||
|
print('exists?', os.path.exists(self.token_file))
|
||||||
if os.path.exists(self.token_file):
|
if os.path.exists(self.token_file):
|
||||||
self.credentials = Credentials.from_authorized_user_file(self.token_file, SCOPES)
|
self.credentials = Credentials.from_authorized_user_file(self.token_file, SCOPES)
|
||||||
|
print('valid?', self.credentials.valid)
|
||||||
if self.credentials is None or not self.credentials.valid:
|
if self.credentials is None or not self.credentials.valid:
|
||||||
if self.credentials is not None \
|
if self.credentials is not None \
|
||||||
and self.credentials.expired \
|
and self.credentials.expired \
|
||||||
|
|
Loading…
Reference in a new issue