Xqt has uploaded a new change for review.

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

Change subject: Allow pywikibot to run on Windows 10 as well
......................................................................

Allow pywikibot to run on Windows 10 as well

Bug: T132273
Change-Id: I5c334d28dec7acfd0c65aef02f8144afee82275c
---
M pywikibot/config2.py
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/68/287168/1

diff --git a/pywikibot/config2.py b/pywikibot/config2.py
index 996228d..731ed8a 100644
--- a/pywikibot/config2.py
+++ b/pywikibot/config2.py
@@ -268,10 +268,10 @@
             home = os.path.expanduser("~")
             if sys.platform == 'win32':
                 import platform
-                win_version = int(platform.version()[0])
+                win_version = int(platform.version().split(".")[0])
                 if win_version == 5:
                     sub_dir = ["Application Data"]
-                elif win_version == 6:
+                elif win_version in (6, 10):
                     sub_dir = ["AppData", "Roaming"]
                 else:
                     raise WindowsError(u'Windows version %s not supported yet.'

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5c334d28dec7acfd0c65aef02f8144afee82275c
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: 2.0
Gerrit-Owner: Xqt <i...@gno.de>
Gerrit-Reviewer: Hazard-SJ <hazardsjw...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to