jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/587876 )
Change subject: [bugfix] Be ok with stable version ......................................................................
[bugfix] Be ok with stable version
Bug: T232496 Change-Id: I291b2d6340e8109c4be9c55cfb5835752ac77e29 --- M pywikibot/version.py 1 file changed, 4 insertions(+), 4 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/version.py b/pywikibot/version.py index f9ff714..7cbc335 100644 --- a/pywikibot/version.py +++ b/pywikibot/version.py @@ -83,10 +83,11 @@
if online: try: + hsh3 = getversion_onlinerepo('tags/stable') hsh2 = getversion_onlinerepo() hsh1 = data['hsh'] data['cmp_ver'] = 'UNKNOWN' if not hsh1 else ( - 'OUTDATED' if hsh1 != hsh2 else 'ok') + 'OUTDATED' if hsh1 not in (hsh2, hsh3) else 'ok') except Exception: pass
@@ -383,14 +384,13 @@ return (tag, rev, date, hsh)
-def getversion_onlinerepo(): +def getversion_onlinerepo(path='branches/master'): """Retrieve current framework git hash from Gerrit.""" from pywikibot.comms import http # Gerrit API responses include )]}' at the beginning, # make sure to strip it out buf = http.fetch( - uri='https://gerrit.wikimedia.org/r/projects/pywikibot%2Fcore/' - 'branches/master', + uri='https://gerrit.wikimedia.org/r/projects/pywikibot%2Fcore/' + path, headers={'user-agent': '{pwb}'}).text[4:] try: hsh = json.loads(buf)['revision']
pywikibot-commits@lists.wikimedia.org