File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -134,7 +134,10 @@ def slop(self, slop):
134
134
135
135
def timeout (self , timeout ):
136
136
"""overrides the timeout parameter of the module"""
137
- self ._timeout = timeout
137
+ if isinstance (timeout , int ) and timeout >= 0 :
138
+ self ._timeout = timeou
139
+ else :
140
+ raise AttributeError ("TIMEOUT requires a non negative integer." )
138
141
return self
139
142
140
143
def in_order (self ):
@@ -194,10 +197,8 @@ def _get_args_tags(self):
194
197
args += self ._ids
195
198
if self ._slop >= 0 :
196
199
args += ["SLOP" , self ._slop ]
197
- if isinstance ( self ._timeout , int ) and self . _timeout >= 0 :
200
+ if self ._timeout is not None :
198
201
args += ["TIMEOUT" , self ._timeout ]
199
- else :
200
- raise AttributeError ("TIMEOUT requires a non negative integer." )
201
202
if self ._in_order :
202
203
args .append ("INORDER" )
203
204
if self ._return_fields :
You can’t perform that action at this time.
0 commit comments