We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dff7414 commit e0c51b9Copy full SHA for e0c51b9
oauth2client/client.py
@@ -629,14 +629,16 @@ def set_store(self, store):
629
self.store = store
630
631
def _expires_in(self):
632
- """Get in how many seconds does the token expire."""
+ """Return the number of seconds until this token expires."""
633
if self.token_expiry:
634
now = datetime.datetime.utcnow()
635
if self.token_expiry > now:
636
time_delta = self.token_expiry - now
637
return int(round(time_delta.days * 86400.0 +
638
time_delta.seconds +
639
time_delta.microseconds * 0.000001))
640
+ else:
641
+ return 0
642
643
def _updateFromCredential(self, other):
644
"""Update this Credential from another instance."""
0 commit comments