[diffoscope] 01/02: comparators.symlink: Make cleanup of placeholders idempotent.
Chris Lamb
chris at chris-lamb.co.uk
Sat Dec 2 23:27:32 CET 2017
This is an automated email from the git hooks/post-receive script.
lamby pushed a commit to branch master
in repository diffoscope.
commit 893a1e725ef1e0c33c0e8c3a35d3312b3cb29ef0
Author: Chris Lamb <lamby at debian.org>
Date: Sat Dec 2 22:16:31 2017 +0000
comparators.symlink: Make cleanup of placeholders idempotent.
---
diffoscope/comparators/symlink.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/diffoscope/comparators/symlink.py b/diffoscope/comparators/symlink.py
index daca922..99b557a 100644
--- a/diffoscope/comparators/symlink.py
+++ b/diffoscope/comparators/symlink.py
@@ -51,7 +51,10 @@ class Symlink(File):
def cleanup(self):
if hasattr(self, '_placeholder'):
- os.remove(self._placeholder)
+ try:
+ os.remove(self._placeholder)
+ except FileNotFoundError:
+ pass
del self._placeholder
super().cleanup()
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git
More information about the diffoscope
mailing list