Skip to content

Commit

Permalink
Update confkeep_commands.py
Browse files Browse the repository at this point in the history
Don't raise FileNotFound if the file you tried to remove is gone already.
  • Loading branch information
marceloslacerda authored Jul 29, 2024
1 parent cb2bfb5 commit bf69996
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions confkeep/confkeep_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,8 @@ def watchdog(self):
os.remove(self.work_path / path.name)
except IsADirectoryError:
shutil.rmtree(self.work_path / path.name)
except FileNotFoundError:
pass # No problem if what you tried to remove is already gone
else:
subprocess.run(
["rsync", "-EWavz", "--delete", str(path), self.work_path],
Expand Down

0 comments on commit bf69996

Please sign in to comment.