Merge "Make swift not hang on error."
This commit is contained in:
commit
8396e3a4cb
21
bin/swift
21
bin/swift
@ -83,20 +83,21 @@ class QueueFunctionThread(Thread):
|
|||||||
self.exc_infos = []
|
self.exc_infos = []
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
try:
|
while True:
|
||||||
while True:
|
try:
|
||||||
|
item = self.queue.get_nowait()
|
||||||
|
except Empty:
|
||||||
|
if self.abort:
|
||||||
|
break
|
||||||
|
sleep(0.01)
|
||||||
|
else:
|
||||||
try:
|
try:
|
||||||
item = self.queue.get_nowait()
|
|
||||||
if not self.abort:
|
if not self.abort:
|
||||||
self.func(item, *self.args, **self.kwargs)
|
self.func(item, *self.args, **self.kwargs)
|
||||||
|
except Exception:
|
||||||
|
self.exc_infos.append(exc_info())
|
||||||
|
finally:
|
||||||
self.queue.task_done()
|
self.queue.task_done()
|
||||||
except Empty:
|
|
||||||
if self.abort:
|
|
||||||
break
|
|
||||||
sleep(0.01)
|
|
||||||
except Exception:
|
|
||||||
self.exc_infos.append(exc_info())
|
|
||||||
|
|
||||||
|
|
||||||
st_delete_help = '''
|
st_delete_help = '''
|
||||||
delete --all OR delete container [--leave-segments] [object] [object] ...
|
delete --all OR delete container [--leave-segments] [object] [object] ...
|
||||||
|
Loading…
Reference in New Issue
Block a user