File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -147,23 +147,25 @@ def status(self):
147147 def main_status (self ):
148148 return self ._status2 ()
149149
150- def progress_changed (self , callback ):
150+ def progress_changed (self , callback , * args , ** kwargs ):
151151 while 1 :
152152 status = self ._status ()
153153 if status ['error' ]:
154- return callback (status )
155- callback (status )
154+ return callback (status , * args , ** kwargs )
155+ callback (status , * args , ** kwargs )
156156 if status .get ('status' ) in COMPLETED_STATUS :
157157 break
158158 time .sleep (SLEEP_REGULAR )
159159
160160
161- def task_completed (self , callback ):
161+ def task_completed (self , callback , * args , ** kwargs ):
162162 while 1 :
163163 status = self ._status ()
164164 if status ['error' ]:
165- return callback (status )
165+ return callback (status , * args , ** kwargs )
166166 if status .get ('status' ) in COMPLETED_STATUS :
167- return callback (status )
167+ return callback (status , * args , ** kwargs )
168+ if status .get ('status' ) in COMPLETED_STATUS :
169+ break
168170 time .sleep (SLEEP_REGULAR )
169171
You can’t perform that action at this time.
0 commit comments