jenkins-bot has submitted this change and it was merged.
Change subject: [bugfix] Ignore non-existent py-file from reading authors
......................................................................
[bugfix] Ignore non-existent py-file from reading authors
If a .py file does not exists, the authors couldn't be read and the script
fails with IOError. This patch doesn't try to read from non-existant file.
Change-Id: I6aabdc276f1ef1214532911049afa59a199604ae
---
M maintenance/i18n_from_json.py
1 file changed, 2 insertions(+), 0 deletions(-)
Approvals:
John Vandenberg: Looks good to me, approved
jenkins-bot: Verified
diff --git a/maintenance/i18n_from_json.py b/maintenance/i18n_from_json.py
index 512bf2d..a4891a6 100644
--- a/maintenance/i18n_from_json.py
+++ b/maintenance/i18n_from_json.py
@@ -159,6 +159,8 @@
"""Read old authors from file."""
self.authors = {}
translators = []
+ if not os.path.exists(self.dest):
+ return
f = codecs.open(self.dest, "r", "utf-8")
findcode = False
while True:
--
To view, visit
https://gerrit.wikimedia.org/r/226489
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I6aabdc276f1ef1214532911049afa59a199604ae
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/compat
Gerrit-Branch: master
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Siebrand <siebrand(a)kitano.nl>
Gerrit-Reviewer: jenkins-bot <>