I thought of that.
The problem is that total_seconds come into existence in Python 2.7 .
I am afraid using total_seconds will make the Python 2.6 tests fail.


On Tue, Jun 3, 2014 at 8:08 AM, Craig Citro <notifications@github.com>
wrote:

> In oauth2client/client.py:
>
> > @@ -625,6 +628,16 @@ def set_store(self, store):
> >      """
> >      self.store = store
> >
> > +  def _expires_in(self):
> > +    """Get in how many seconds does the token expire."""
> > +    if self.token_expiry:
> > +      now = datetime.datetime.utcnow()
> > +      if self.token_expiry > now:
> > +        time_delta = self.token_expiry - now
> > +        return int(round(time_delta.days * 86400.0 +
>
> might be easier to just return time_delta.total_seconds :)
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/google/oauth2client/pull/15/files#r13339363>.
>



-- 
Orest Bolohan

Software Engineer
Cloud/TI Identity and Access Management Services
Google Inc.
Mountain View, CA

(650) 214 3458
orest@google.com