File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -148,23 +148,25 @@ def status(self):
148148 def main_status (self ):
149149 return self ._status2 ()
150150
151- def progress_changed (self , callback ):
151+ def progress_changed (self , callback , * args , ** kwargs ):
152152 while 1 :
153153 status = self ._status ()
154154 if status ['error' ]:
155- return callback (status )
156- callback (status )
155+ return callback (status , * args , ** kwargs )
156+ callback (status , * args , ** kwargs )
157157 if status .get ('status' ) in COMPLETED_STATUS :
158158 break
159159 time .sleep (SLEEP_REGULAR )
160160
161161
162- def task_completed (self , callback ):
162+ def task_completed (self , callback , * args , ** kwargs ):
163163 while 1 :
164164 status = self ._status ()
165165 if status ['error' ]:
166- return callback (status )
166+ return callback (status , * args , ** kwargs )
167167 if status .get ('status' ) in COMPLETED_STATUS :
168- return callback (status )
168+ return callback (status , * args , ** kwargs )
169+ if status .get ('status' ) in COMPLETED_STATUS :
170+ break
169171 time .sleep (SLEEP_REGULAR )
170172
You can’t perform that action at this time.
0 commit comments