From: Peter Palfrader Date: Fri, 21 Jun 2013 10:33:44 +0000 (+0200) Subject: Only unlink if it does not exist X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=b2b520d14db5a62c124270b997489d8c7c81f329;p=mirror%2Fdsa-puppet.git Only unlink if it does not exist --- diff --git a/modules/roles/files/static-mirroring/static-master-run b/modules/roles/files/static-mirroring/static-master-run index d2f364d6b..c85e98447 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...")