File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 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):
134134
135135 def timeout (self , timeout ):
136136 """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." )
138141 return self
139142
140143 def in_order (self ):
@@ -194,10 +197,8 @@ def _get_args_tags(self):
194197 args += self ._ids
195198 if self ._slop >= 0 :
196199 args += ["SLOP" , self ._slop ]
197- if isinstance ( self ._timeout , int ) and self . _timeout >= 0 :
200+ if self ._timeout is not None :
198201 args += ["TIMEOUT" , self ._timeout ]
199- else :
200- raise AttributeError ("TIMEOUT requires a non negative integer." )
201202 if self ._in_order :
202203 args .append ("INORDER" )
203204 if self ._return_fields :
You can’t perform that action at this time.
0 commit comments