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 @@ -147,23 +147,25 @@ def status(self):
147
147
def main_status (self ):
148
148
return self ._status2 ()
149
149
150
- def progress_changed (self , callback ):
150
+ def progress_changed (self , callback , * args , ** kwargs ):
151
151
while 1 :
152
152
status = self ._status ()
153
153
if status ['error' ]:
154
- return callback (status )
155
- callback (status )
154
+ return callback (status , * args , ** kwargs )
155
+ callback (status , * args , ** kwargs )
156
156
if status .get ('status' ) in COMPLETED_STATUS :
157
157
break
158
158
time .sleep (SLEEP_REGULAR )
159
159
160
160
161
- def task_completed (self , callback ):
161
+ def task_completed (self , callback , * args , ** kwargs ):
162
162
while 1 :
163
163
status = self ._status ()
164
164
if status ['error' ]:
165
- return callback (status )
165
+ return callback (status , * args , ** kwargs )
166
166
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
168
170
time .sleep (SLEEP_REGULAR )
169
171
You can’t perform that action at this time.
0 commit comments