Xqt has uploaded a new change for review.

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

Change subject: [bugfix] LogEntry is not a valid logtype class
......................................................................

[bugfix] LogEntry is not a valid logtype class

- LogEntry is not a valid logtype class but a generic super class.
  Raise an exception if logtype doesn't match any of registered _logtypes.

Bug: T135505
Change-Id: I096cf636c6da1d65fe578e053594a5203d4dceb8
---
M pywikibot/logentries.py
1 file changed, 1 insertion(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/27/289227/1

diff --git a/pywikibot/logentries.py b/pywikibot/logentries.py
index a12715d..9a946db 100644
--- a/pywikibot/logentries.py
+++ b/pywikibot/logentries.py
@@ -422,10 +422,7 @@
         @return: specified subclass of LogEntry, or LogEntry
         @rtype: class
         """
-        try:
-            return cls._logtypes[logtype]
-        except KeyError:
-            return LogEntry
+        return cls._logtypes[logtype]
 
     def _createFromData(self, logdata):
         """

-- 
To view, visit https://gerrit.wikimedia.org/r/289227
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I096cf636c6da1d65fe578e053594a5203d4dceb8
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <i...@gno.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to