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 045b8c2 commit 3ff37a8Copy full SHA for 3ff37a8
pwnlib/timeout.py
@@ -30,9 +30,11 @@ def __enter__(self):
30
self.obj._stop = min(self.obj._stop, self.old_stop)
31
32
self.obj._timeout = self.timeout
33
+ self.obj.timeout_change()
34
def __exit__(self, *a):
35
self.obj._timeout = self.old_timeout
36
self.obj._stop = self.old_stop
37
38
39
class _local_handler(object):
40
def __init__(self, obj, timeout):
@@ -157,7 +159,7 @@ def _get_timeout_seconds(self, value):
157
159
else:
158
160
value = float(value)
161
- if value is value < 0:
162
+ if value < 0:
163
raise AttributeError("timeout: Timeout cannot be negative")
164
165
if value > self.maximum:
0 commit comments