Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gevent
Commits
045e21f8
Commit
045e21f8
authored
Apr 11, 2012
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
timeout.py: replace basestring with string_types
parent
a30ef3f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
gevent/timeout.py
gevent/timeout.py
+2
-2
No files found.
gevent/timeout.py
View file @
045e21f8
...
...
@@ -14,7 +14,7 @@ to arbitrary code.
"""
import
sys
from
gevent.hub
import
getcurrent
,
_NONE
,
get_hub
,
basestring
from
gevent.hub
import
getcurrent
,
_NONE
,
get_hub
,
string_types
__all__
=
[
'Timeout'
,
'with_timeout'
]
...
...
@@ -96,7 +96,7 @@ class Timeout(BaseException):
assert
not
self
.
pending
,
'%r is already started; to restart it, cancel it first'
%
self
if
self
.
seconds
is
None
:
# "fake" timeout (never expires)
pass
elif
self
.
exception
is
None
or
self
.
exception
is
False
or
isinstance
(
self
.
exception
,
basestring
):
elif
self
.
exception
is
None
or
self
.
exception
is
False
or
isinstance
(
self
.
exception
,
string_types
):
# timeout that raises self
self
.
timer
.
start
(
getcurrent
().
throw
,
self
)
else
:
# regular timeout with user-provided exception
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment