Eranroz has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/192066

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(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/66/192066/1

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(' ')

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9b4b9334c5af52cd2cf869b6aac9a62c66578013
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Eranroz <[email protected]>

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

Reply via email to