Dalba has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/405750
)
Change subject: pywikibot.version.getversion: Display UNKNOWN status when there is no
hash
......................................................................
pywikibot.version.getversion: Display UNKNOWN status when there is no hash
When the hash value is not found, it defaults to an empty string which should
be differentiated from a valid hash value.
This patch does not fully resolve T184692, it merely displays a more
appropriate status.
Bug: T184692
Change-Id: Icb0ef92dbc9e883c65510759dd0129fcf1b68b8d
---
M pywikibot/version.py
1 file changed, 2 insertions(+), 1 deletion(-)
Approvals:
jenkins-bot: Verified
Xqt: Looks good to me, approved
diff --git a/pywikibot/version.py b/pywikibot/version.py
index b76f2a6..956a2f0 100644
--- a/pywikibot/version.py
+++ b/pywikibot/version.py
@@ -78,7 +78,8 @@
try:
hsh2 = getversion_onlinerepo()
hsh1 = data['hsh']
- data['cmp_ver'] = 'OUTDATED' if hsh1 != hsh2 else
'ok'
+ data['cmp_ver'] = 'UNKNOWN' if not hsh1 else (
+ 'OUTDATED' if hsh1 != hsh2 else 'ok')
except Exception:
pass
--
To view, visit
https://gerrit.wikimedia.org/r/405750
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Icb0ef92dbc9e883c65510759dd0129fcf1b68b8d
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Dalba <dalba.wiki(a)gmail.com>
Gerrit-Reviewer: Dalba <dalba.wiki(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: Zoranzoki21 <zorandori4444(a)gmail.com>
Gerrit-Reviewer: jenkins-bot <>