Page MenuHomePhabricator

add_text.py and commonscat.py report NoEnoughData to user
Closed, ResolvedPublic

Description

If add_text is called without parameters, it should give a nice warning or show help.

$ python pwb.py scripts/add_text.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/add_text.py", line 371, in <module>
  main()
File "scripts/add_text.py", line 354, in main
  'You have to specify the generator you want to use for the script!')

main__.NoEnoughData: You have to specify the generator you want to use for the script!
<class '
main__.NoEnoughData'>


Version: core-(2.0)
Severity: normal

Details

Reference
bz69091

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:33 AM
bzimport set Reference to bz69091.

Change 151971 had a related patch set uploaded by Ricordisamoa:
call pywikibot.showHelp() instead of raising NoEnoughData

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

Change 151971 merged by jenkins-bot:
call pywikibot.showHelp() instead of raising NoEnoughData

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