From b2b520d14db5a62c124270b997489d8c7c81f329 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Fri, 21 Jun 2013 12:33:44 +0200 Subject: [PATCH] Only unlink if it does not exist --- modules/roles/files/static-mirroring/static-master-run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/roles/files/static-mirroring/static-master-run b/modules/roles/files/static-mirroring/static-master-run index d2f364d6..c85e9844 100755 --- a/modules/roles/files/static-mirroring/static-master-run +++ b/modules/roles/files/static-mirroring/static-master-run @@ -116,7 +116,7 @@ def callout(component, serial): if status[c] == 'failed': f.write(c+"\n") f.close() else: - os.unlink(failedmirrorsfile) + if os.path.exists(failedmirrorsfile): os.unlink(failedmirrorsfile) if 'waiting' in cnt: log("Committing...") -- 2.39.2