jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/699581 )
Change subject: [bugfix] Fix file/url detection for Windows ......................................................................
[bugfix] Fix file/url detection for Windows
Bug: T284886 Change-Id: I9fe198da009cdac45b75e69953369b2a2fbed054 --- M pywikibot/pagegenerators.py 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py index 9c59f70..5be66b9 100644 --- a/pywikibot/pagegenerators.py +++ b/pywikibot/pagegenerators.py @@ -1598,7 +1598,7 @@ if site is None: site = pywikibot.Site() # If source cannot be parsed as an HTTP URL, treat as local file - if not urlparse(source).scheme: + if not urlparse(source).netloc: with codecs.open(source, 'r', config.textfile_encoding) as f: yield from _yield_titles(f, site) # Else, fetch page (page should return text in same format as that expected
pywikibot-commits@lists.wikimedia.org