Xqt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377067 )

Change subject: [bugfix] Check KeyError for hidden logentry comment
......................................................................

[bugfix] Check KeyError for hidden logentry comment

Bug: T175496
Change-Id: Ie51178dd457dcaa9c39345014d1d0f1e48e5c36b
---
M tests/logentry_tests.py
1 file changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/67/377067/1

diff --git a/tests/logentry_tests.py b/tests/logentry_tests.py
index cf96995..e32f3d3 100644
--- a/tests/logentry_tests.py
+++ b/tests/logentry_tests.py
@@ -75,7 +75,10 @@
         else:
             self.assertNotIn(logentry.type(), logentry.data)
         self.assertIsInstance(logentry.action(), unicode)
-        self.assertIsInstance(logentry.comment(), unicode)
+        if hasattr(logentry, 'comment'):
+            self.assertIsInstance(logentry.comment(), unicode)
+        else:
+            self.assertRaises(KeyError, logentry.comment)
         self.assertIsInstance(logentry.logid(), int)
         self.assertIsInstance(logentry.ns(), int)
         self.assertIsInstance(logentry.pageid(), int)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie51178dd457dcaa9c39345014d1d0f1e48e5c36b
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