Page MenuHomePhabricator

APISite.exturlusage() method fails for default parameters
Closed, ResolvedPublic

Description

APISite.exturlusage() parameters are always None for defautl or False in case of content. But calling the method with default parameter fails with TypeError:

>>> import pywikibot as py
>>> s = py.Site()
>>> r = s.exturlusage()
Traceback (most recent call last):
  File "<pyshell#6>", line 1, in <module>
    r = s.exturlusage()
  File "C:\pwb\GIT\core\pywikibot\tools\__init__.py", line 1449, in wrapper
    return obj(*__args, **__kw)
  File "C:\pwb\GIT\core\pywikibot\site\__init__.py", line 3909, in exturlusage
    if separator in url:
TypeError: argument of type 'NoneType' is not iterable

Event Timeline

Xqt triaged this task as Medium priority.Nov 2 2020, 7:56 AM

Change 638017 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [bugfix] Enable APISite.exturlusage() with default parameters

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

Change 638017 merged by jenkins-bot:
[pywikibot/core@master] [bugfix] Enable APISite.exturlusage() with default parameters

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