[Pywikipedia-bugs] [Maniphest] [Commented On] T74305: Wikidata scripts exit with an exception when the site is not a wikibase client

2022-12-18 Thread Xqt
Xqt added a comment.


  In T74305#8476435 , 
@RPI2026F1 wrote:
  
  > Is this not expected behavior if the site is not a Wikibase client? It 
makes no sense trying to run Wikibase-related scripts for something that isn't 
linked to Wikibase.
  
  I think yes. But we can make bot.suggest_help() function a context manager 
and use this within scripts like:
  
with suggest_help(...):
bot.run()
  
  and catch the exeption inside instead of doing the propoesed
  
try:
bot.run()
except Exception as e
suggest_help(exception=e):

TASK DETAIL
  https://phabricator.wikimedia.org/T74305

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Xqt
Cc: Xqt, RPI2026F1, jayvdb, Ricordisamoa, pywikibot-bugs-list, PotsdamLamb, 
Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, 
Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, 
Masti, Alchimista
___
pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org
To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org


[Pywikipedia-bugs] [Maniphest] [Commented On] T74305: Wikidata scripts exit with an exception when the site is not a wikibase client

2022-12-18 Thread RPI2026F1
RPI2026F1 added a comment.


  Is this not expected behavior if the site is not a Wikibase client? It makes 
no sense trying to run Wikibase-related scripts for something that isn't linked 
to Wikibase.

TASK DETAIL
  https://phabricator.wikimedia.org/T74305

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: RPI2026F1
Cc: RPI2026F1, jayvdb, Ricordisamoa, pywikibot-bugs-list, PotsdamLamb, 
Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, 
Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, 
Xqt, Masti, Alchimista
___
pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org
To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org