atagar added a comment.
That's odd. I do get it...
% cat demo.py
import pywikibot
from pywikibot import NoPage # same behavior if imported from
pywikibot.exceptions
from pywikibot.exceptions import NoPageError
pywikibot.handle_args()
site = pywikibot.Site()
page = pywikibot.Page(site, 'Example')
try:
raise NoPage(page)
except NoPageError as e:
print('success: NoPageError caught NoPage:', e)
% python demo.py
demo.py:2: DeprecationWarning: pywikibot.NoPage is deprecated for 5 days;
use pywikibot.exceptions.NoPageError instead.
from pywikibot import NoPage # same behavior if imported from
pywikibot.exceptions
success: NoPageError caught NoPage: Page [[en:Example]] doesn't exist.
TASK DETAIL
https://phabricator.wikimedia.org/T280227
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: atagar
Cc: JJMC89, pywikibot-bugs-list, Xqt, Aklapper, Shalomori123, Lalamarie69,
Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Alter-paule, Beast1978, Un1tY,
Khutuck, Zkhalido, Hook696, Kent7301, joker88john, Viztor, CucyNoiD, Wenyi,
Gaboe420, Giuliamocci, Cpaulf30, Af420, Bsandipan, Tbscho, MayS, Lewizho99,
Mdupont, Maathavan, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb,
Masti, Alchimista
_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs