jenkins-bot has submitted this change and it was merged.
Change subject: [FIX] Logevents: Support automatic selection ......................................................................
[FIX] Logevents: Support automatic selection
With 675c29ee5771a32e99512082ccf0c734f32b017f the log event constructors require the site parameter which wasn't used in the automatic log type selector.
Change-Id: Ice0b389654228cf6aad72877d2fc286e79e28ad2 --- M pywikibot/logentries.py 1 file changed, 4 insertions(+), 3 deletions(-)
Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/logentries.py b/pywikibot/logentries.py index 5b35cd8..8bfb0a6 100644 --- a/pywikibot/logentries.py +++ b/pywikibot/logentries.py @@ -279,7 +279,8 @@ else: # Bind a Class object to self._creator: # When called, it will initialize a new object of that class - self._creator = LogEntryFactory._getEntryClass(logtype) + logclass = LogEntryFactory._getEntryClass(logtype) + self._creator = lambda data: logclass(data, self._site)
def create(self, logdata): """ @@ -290,7 +291,7 @@
@return: LogEntry object representing logdata """ - return self._creator(logdata, self._site) + return self._creator(logdata)
@staticmethod def _getEntryClass(logtype): @@ -315,7 +316,7 @@ """ try: logtype = logdata['type'] - return LogEntryFactory._getEntryClass(logtype)(logdata) + return LogEntryFactory._getEntryClass(logtype)(logdata, self._site) except KeyError: pywikibot.debug(u"API log entry received:\n" + logdata, _logger)