jenkins-bot has submitted this change and it was merged.
Change subject: Allow pywikibot to run on Windows 10 as well
......................................................................
Allow pywikibot to run on Windows 10 as well
cherry-picked from 426471882e662
Bug: T132273
Bug: T134550
Change-Id: I5c334d28dec7acfd0c65aef02f8144afee82275c
---
M pywikibot/config2.py
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
John Vandenberg: Looks good to me, approved
jenkins-bot: Verified
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: merged
Gerrit-Change-Id: I5c334d28dec7acfd0c65aef02f8144afee82275c
Gerrit-PatchSet: 3
Gerrit-Project: pywikibot/core
Gerrit-Branch: 2.0
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Hazard-SJ <hazardsjwiki(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Josve05a <gladjonatan(a)outlook.com>
Gerrit-Reviewer: jenkins-bot <>