jenkins-bot submitted this change.
[bugfix] api.APIError() called without enough args
Fixed also typos in docstrings.
Change-Id: Iba9bce7bef59a6400fcac028cd6078fa4846609e
---
M pywikibot/site/__init__.py
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/pywikibot/site/__init__.py b/pywikibot/site/__init__.py
index 601ada6..a4271c6 100644
--- a/pywikibot/site/__init__.py
+++ b/pywikibot/site/__init__.py
@@ -2385,7 +2385,7 @@
"""Iterate global image usage for a given FilePage.
@param page: the page to return global image usage for.
- @type image: pywikibot.FilePage
+ @type page: pywikibot.FilePage
@param total: iterate no more than this number of pages in total.
@raises TypeError: input page is not a FilePage.
@raises pywikibot.exceptions.SiteDefinitionError: Site could not be
@@ -2508,7 +2508,7 @@
for the given action type.
@param page: a pywikibot.Page object
- @type param: pywikibot.Page
+ @type page: pywikibot.Page
@param action: a valid restriction type like 'edit', 'move'
@type action: str
@rtype: bool
@@ -6193,8 +6193,8 @@
@see: U{https://www.mediawiki.org/wiki/API:Protectedtitles}
- @param namespaces: The searched namespace.
- @type namespaces: int or Namespace or str
+ @param namespace: The searched namespace.
+ @type namespace: int or Namespace or str
@param type: The protection type to search for (default 'edit').
@type type: str
@param level: The protection level (like 'autoconfirmed'). If False it
@@ -6299,7 +6299,7 @@
"""Return a generator to pages containing linter errors.
@param lint_categories: categories of lint errors
- @type lntcategories: an iterable that returns values (str),
+ @type lint_categories: an iterable that returns values (str),
or a pipe-separated string of values.
@param total: if not None, yielding this many items in total
@@ -6364,7 +6364,7 @@
source=source)
data = req.submit()
if data['result']['success'] != 1:
- raise api.APIError('Thanking unsuccessful')
+ raise api.APIError('Thanking unsuccessful', '')
return data
@need_extension('Flow')
@@ -6383,7 +6383,7 @@
postid=post_id, token=token)
data = req.submit()
if data['result']['success'] != 1:
- raise api.APIError('Thanking unsuccessful')
+ raise api.APIError('Thanking unsuccessful', '')
return data
# Flow API calls
@@ -7083,7 +7083,7 @@
req = self._simple_request(**params)
data = req.submit()
if 'success' not in data:
- raise api.APIError(data['errors'])
+ raise api.APIError(data['errors'], '')
return data['entities']
def preload_entities(self, pagelist, groupsize=50):
To view, visit change 634503. To unsubscribe, or for help writing mail filters, visit settings.