Skip to content

Commit

Permalink
fix move session to unnecessary dir
Browse files Browse the repository at this point in the history
  • Loading branch information
kanewi11 committed Nov 24, 2022
1 parent 8c75fab commit 087f7f1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions reactionbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,12 @@ async def try_convert(session_path: Path, config: Dict):
try:
await convertor.convert()
except OperationalError:
await convertor.move_file_to_unnecessary(session_path)
if session_path.exists():
await convertor.move_file_to_unnecessary(session_path)
for suffix in CONFIG_FILE_SUFFIXES:
config_file_path = session_path.with_suffix(suffix)
await convertor.move_file_to_unnecessary(config_file_path)
if config_file_path.exists():
await convertor.move_file_to_unnecessary(config_file_path)
logging.warning('Preservation of the session failed ' + session_path.stem)


Expand Down

0 comments on commit 087f7f1

Please sign in to comment.