jenkins-bot has submitted this change and it was merged.
Change subject: [FEAT] Logentries: Don't duplicate key and show type ......................................................................
[FEAT] Logentries: Don't duplicate key and show type
This doesn't pass the key two times introduced in bedf6f00b8fdb80b999b6b07a7e4a757644e77cb. It also passes the log type in which that dictionary was used.
Change-Id: I9fe1f3dd88102daf4d3fb1440d79d85fd89b2dc5 --- M pywikibot/logentries.py 1 file changed, 2 insertions(+), 1 deletion(-)
Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/logentries.py b/pywikibot/logentries.py index 750279b..791330e 100644 --- a/pywikibot/logentries.py +++ b/pywikibot/logentries.py @@ -25,7 +25,7 @@ def __missing__(self, key): pywikibot.debug(u"API log entry received:\n" + repr(self), _logger) - raise KeyError("Log entry has no '%s' key" % key, key) + raise KeyError("Log entry (%s) has no '%s' key" % (self._type, key))
class LogEntry(object): @@ -44,6 +44,7 @@ if self._expectedType is not None and self._expectedType != self.type(): raise Error("Wrong log type! Expecting %s, received %s instead." % (self._expectedType, self.type())) + self.data._type = self.type()
def __hash__(self): return self.logid()
pywikibot-commits@lists.wikimedia.org