mirror of
https://github.com/Faraphel/Atlas-Install.git
synced 2025-07-04 03:38:26 +02:00
added case if clean_process or add_process return -1
This commit is contained in:
parent
58192ffe75
commit
1e8bb0b13c
1 changed files with 9 additions and 3 deletions
|
@ -114,8 +114,14 @@ def patch_track(self, tracks, total_track="?"):
|
||||||
track_file = get_trackname(track=track)
|
track_file = get_trackname(track=track)
|
||||||
while True:
|
while True:
|
||||||
if len(process_list) < max_process:
|
if len(process_list) < max_process:
|
||||||
if add_process(track_file) == 0: break
|
returncode = add_process(track_file)
|
||||||
else: clean_process()
|
if returncode == 0: break
|
||||||
while clean_process() != 1: pass # End the process if all process ended
|
elif returncode == -1: return -1 # if error occur, stop function
|
||||||
|
elif clean_process() == -1: return -1
|
||||||
|
|
||||||
|
while True:
|
||||||
|
returncode = clean_process()
|
||||||
|
if returncode == 1: break # End the process if all process ended
|
||||||
|
elif returncode == -1: return
|
||||||
|
|
||||||
return 0
|
return 0
|
Loading…
Reference in a new issue