Page MenuHomePhabricator

lonelypages.py throws Exception if not configured for the site
Closed, ResolvedPublic

Description

Pywikibot scripts should do something better than raise an exception in main()

$ python pwb.py scripts/lonelypages.py
Traceback (most recent call last):

File "pwb.py", line 166, in <module>
  run_python_file(fn, argv, argvu)
File "pwb.py", line 67, in run_python_file
  exec(compile(source, filename, "exec"), main_mod.__dict__)
File "scripts/lonelypages.py", line 253, in <module>
  main()
File "scripts/lonelypages.py", line 135, in main
  raise Exception("Missing configuration for site %r" % wikiSite)

Exception: Missing configuration for site Site("wikidata", "wikidata")
<type 'exceptions.Exception'>


Version: core-(2.0)
Severity: normal

Details

Reference
bz69089