Dalba has uploaded a new change for review. ( 
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

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


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/50/405750/1

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: newchange
Gerrit-Change-Id: Icb0ef92dbc9e883c65510759dd0129fcf1b68b8d
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Dalba <[email protected]>

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

Reply via email to