Skip to content

Commit

Permalink
fix: handle error while moving
Browse files Browse the repository at this point in the history
  • Loading branch information
soerenschneider committed Feb 5, 2023
1 parent 09701d8 commit 5f761a7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lootorganizer/categorizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ def examinate_target(self) -> None:
if not os.path.isdir(dest_dir):
logging.info("Dir %s does not exist, trying to create it", dest_dir)
self.file_handler.mkdir(dest_dir)
self.file_handler.move(obj, dest_dir)
try:
self.file_handler.move(obj, dest_dir)
except Exception as err:
logging.error("Encountered error while moving '%s' -> '%s': %s", obj, dest_dir, err)

self.tidy_movies()
self.tidy_shows()
Expand Down

0 comments on commit 5f761a7

Please sign in to comment.