Skip to content

don't rely on timedelta.total_seconds in AsyncResult#1608

Merged
fperez merged 1 commit into
ipython:masterfrom
minrk:ar_sugar_2.6
Apr 16, 2012
Merged

don't rely on timedelta.total_seconds in AsyncResult#1608
fperez merged 1 commit into
ipython:masterfrom
minrk:ar_sugar_2.6

Conversation

@minrk
Copy link
Copy Markdown
Member

@minrk minrk commented Apr 15, 2012

which is new in 2.7

Could result in weird errors, because the result was
an AttributeError (on timedelta) raised in a property, which triggered
the __getattr__() path, which would also fail.

which is new in 2.7

Could result in weird errors, because the result was
an AttributeError raised in a property, which triggered
the `__getattr__()` path, which would also fail.
@fperez
Copy link
Copy Markdown
Member

fperez commented Apr 16, 2012

Great, thanks for the fix!

@fperez
Copy link
Copy Markdown
Member

fperez commented Apr 16, 2012

Merging now.

fperez added a commit that referenced this pull request Apr 16, 2012
don't rely on timedelta.total_seconds in AsyncResult (timedelta is new in python 2.7).  

This maintains compatibility with Python 2.6; the utility function introduced can be removed if/when we drop 2.6 support.
@fperez fperez merged commit 5750e2d into ipython:master Apr 16, 2012
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
don't rely on timedelta.total_seconds in AsyncResult (timedelta is new in python 2.7).  

This maintains compatibility with Python 2.6; the utility function introduced can be removed if/when we drop 2.6 support.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants