File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -245,11 +245,12 @@ def handler(signum, frame):
245
245
else keys
246
246
):
247
247
status = self ._populate1 (key , jobs , ** populate_kwargs )
248
- if status is not None :
249
- if isinstance (status , tuple ):
250
- error_list .append (status )
251
- elif status :
252
- success_list .append (1 )
248
+ if status is True :
249
+ success_list .append (1 )
250
+ elif isinstance (status , tuple ):
251
+ error_list .append (status )
252
+ else :
253
+ assert status is False
253
254
else :
254
255
# spawn multiple processes
255
256
self .connection .close () # disconnect parent process from MySQL server
@@ -262,11 +263,12 @@ def handler(signum, frame):
262
263
else contextlib .nullcontext ()
263
264
) as progress_bar :
264
265
for status in pool .imap (_call_populate1 , keys , chunksize = 1 ):
265
- if status is not None :
266
- if isinstance (status , tuple ):
267
- error_list .append (status )
268
- elif status :
269
- success_list .append (1 )
266
+ if status is True :
267
+ success_list .append (1 )
268
+ elif isinstance (status , tuple ):
269
+ error_list .append (status )
270
+ else :
271
+ assert status is False
270
272
if display_progress :
271
273
progress_bar .update ()
272
274
self .connection .connect () # reconnect parent process to MySQL server
You can’t perform that action at this time.
0 commit comments