fix folder 2
Showing
1 changed file
with
2 additions
and
5 deletions
| ... | @@ -353,13 +353,10 @@ class Command(BaseCommand, LoggerMixin): | ... | @@ -353,13 +353,10 @@ class Command(BaseCommand, LoggerMixin): |
| 353 | traceback.format_exc())) | 353 | traceback.format_exc())) |
| 354 | failed_path = os.path.join(failed_output_dir, '{0}_{1}'.format(time.time(), name)) | 354 | failed_path = os.path.join(failed_output_dir, '{0}_{1}'.format(time.time(), name)) |
| 355 | shutil.move(path, failed_path) | 355 | shutil.move(path, failed_path) |
| 356 | except PermissionError: | 356 | except Exception as e: |
| 357 | os_error_filename_set.add(name) | 357 | os_error_filename_set.add(name) |
| 358 | self.folder_log.error('{0} [permission error] [path={1}] [error={2}]'.format( | 358 | self.folder_log.error('{0} [file move error] [path={1}] [error={2}]'.format( |
| 359 | self.log_base, path, traceback.format_exc())) | 359 | self.log_base, path, traceback.format_exc())) |
| 360 | except Exception as e: | ||
| 361 | self.folder_log.error('{0} [file error] [error={1}]'.format( | ||
| 362 | self.log_base, traceback.format_exc())) | ||
| 363 | 360 | ||
| 364 | def handle(self, *args, **kwargs): | 361 | def handle(self, *args, **kwargs): |
| 365 | process_list = [] | 362 | process_list = [] | ... | ... |
-
Please register or sign in to post a comment