John Vandenberg has uploaded a new change for review.

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

Change subject: [bugfix] pass User page object to NotEmailableError
......................................................................

[bugfix] pass User page object to NotEmailableError

NotEmailableError is derived from PageRelatedError and
expect a page object as first parameter but got a string.

Bug: T135364
Change-Id: I5aad3aaa76802884b744f89a633d716e1aab5286
---
M pywikibot/page.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/38/290638/1

diff --git a/pywikibot/page.py b/pywikibot/page.py
index a9c7a4e..a78ed9a 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -2843,7 +2843,7 @@
         @rtype: bool
         """
         if not self.isEmailable():
-            raise NotEmailableError('%s is not mailable' % self.username)
+            raise NotEmailableError(self)
 
         if not self.site.has_right('sendemail'):
             raise UserRightsError('You don\'t have permission to send mail')

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5aad3aaa76802884b744f89a633d716e1aab5286
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: 2.0
Gerrit-Owner: John Vandenberg <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to