jenkins-bot has submitted this change and it was merged.
Change subject: exec(line) of other packages is unexpected... ......................................................................
exec(line) of other packages is unexpected...
Change-Id: I9b4b9334c5af52cd2cf869b6aac9a62c66578013 --- M pywikibot/version.py 1 file changed, 4 insertions(+), 1 deletion(-)
Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/version.py b/pywikibot/version.py index 723a221..7f06fa1 100644 --- a/pywikibot/version.py +++ b/pywikibot/version.py @@ -274,7 +274,10 @@ with codecs.open(fn, 'r', "utf-8") as f: for line in f.readlines(): if line.find('__version__') == 0: - exec(line) + try: + exec(line) + except: + pass break stat = os.stat(fn) mtime = datetime.datetime.fromtimestamp(stat.st_mtime).isoformat(' ')