Skip to content
This repository has been archived by the owner on Apr 26, 2021. It is now read-only.

Commit

Permalink
SubprocessMethod TimeOut(time) exception
Browse files Browse the repository at this point in the history
  • Loading branch information
sergirubio committed Mar 31, 2020
1 parent e53b1f9 commit 033e73b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fandango/threads.py
Original file line number Diff line number Diff line change
Expand Up @@ -1164,7 +1164,7 @@ def _remove_task(self,item=None):

def SubprocessMethod(obj,*args,**kwargs):
"""
arguments:
arguments (this will be extracted from kwargs):
object : object to extract method or callable
method : string or callable to get from object
timeout : seconds
Expand Down Expand Up @@ -1234,7 +1234,7 @@ def do_it(o,m,conn,*a,**k):
proc.terminate(),proc.join() #close process

if time.time()>t0+timeout:
result = Exception('TimeOut(%s)!'%str(obj))
result = Exception('TimeOut(%s,%s)!'%(str(obj),timeout))
if callback:
callback(result)
elif isinstance(result,Exception):
Expand Down

0 comments on commit 033e73b

Please sign in to comment.