Commit 9076762b by willmcgugan

Improved error on fscp

parent 3f3138fe
......@@ -33,7 +33,6 @@ class FileOpThread(threading.Thread):
else:
self.action(fs, path, self.dest_fs, dest_path, overwrite=True)
except Exception, e:
print e
self.on_error(e)
self.queue.task_done()
break
......@@ -183,6 +182,7 @@ Copy SOURCE to DESTINATION"""
for thread in threads:
thread.join()
complete = True
if not any_error():
self.post_actions()
dst_fs.close()
......@@ -190,7 +190,6 @@ Copy SOURCE to DESTINATION"""
if self.action_errors:
for error in self.action_errors:
self.error(self.wrap_error(unicode(error)) + '\n')
sys.stdout.write('\n')
sys.stdout.flush()
else:
if complete and options.progress:
......@@ -217,7 +216,6 @@ Copy SOURCE to DESTINATION"""
self.lock.release()
def on_error(self, e):
print e
self.lock.acquire()
try:
self.action_errors.append(e)
......@@ -240,9 +238,7 @@ Copy SOURCE to DESTINATION"""
done_steps = int(done * bar_width)
bar_steps = ('#' * done_steps).ljust(bar_width)
msg = '%s %i%%' % (msg, int(done * 100.0))
msg = msg.ljust(20)
if total == remaining:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment