jenkins-bot has submitted this change and it was merged.

Change subject: Safety thing prevent overwriting files
......................................................................


Safety thing prevent overwriting files

Change-Id: Ic41b4f83b9e1e4988513306a7ded04698c738fb5
---
M audit/paypal/parse_nightly
1 file changed, 2 insertions(+), 0 deletions(-)

Approvals:
  Ejegg: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/audit/paypal/parse_nightly b/audit/paypal/parse_nightly
index 1d72259..78c2ca5 100755
--- a/audit/paypal/parse_nightly
+++ b/audit/paypal/parse_nightly
@@ -43,6 +43,8 @@
     dest_path = os.path.join(config.archive_path, filename)
 
     log.info("Archiving {orig} to {new}".format(orig=path, new=dest_path))
+    if os.path.exists(dest_path):
+        raise Exception("Failed to archive file because destination path 
already exists: " + dest_path)
     shutil.move(path, dest_path)
 
 if __name__ == '__main__':

-- 
To view, visit https://gerrit.wikimedia.org/r/178004
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic41b4f83b9e1e4988513306a7ded04698c738fb5
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/tools
Gerrit-Branch: master
Gerrit-Owner: Awight <[email protected]>
Gerrit-Reviewer: AndyRussG <[email protected]>
Gerrit-Reviewer: Awight <[email protected]>
Gerrit-Reviewer: Ejegg <[email protected]>
Gerrit-Reviewer: Katie Horn <[email protected]>
Gerrit-Reviewer: Ssmith <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to