Page MenuHomePhabricator

transferbot raises ugly exception if zero cmd line arguments are given
Closed, ResolvedPublic

Description

$ python pwb.py transferbot
Traceback (most recent call last):
  File "pwb.py", line 157, 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/transferbot.py", line 132, in <module>
    main()
  File "scripts/transferbot.py", line 78, in main
    raise Exception('Target site not different from source site')
Exception: Target site not different from source site
<type 'exceptions.Exception'>
CRITICAL: Waiting for 1 network thread(s) to finish. Press ctrl-c to abort

It should give a pretty message, and/or show help, but at least it is informative.


Version: core-(2.0)
Severity: minor

Details

Reference
bz68662

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:39 AM
bzimport set Reference to bz68662.
bzimport added a subscriber: Unknown Object (????).

audiodude wrote:

I have https://gerrit.wikimedia.org/r/#/c/151808/ for fixing this, but I couldn't figure out how to use this bugzilla interface to mark that....

(In reply to Travis Briggs from comment #1)

but I couldn't figure out how to use this bugzilla interface to mark that

If you follow http://www.mediawiki.org/wiki/Gerrit/Commit_message_guidelines (see Auto-linking and cross-referencing) you don't need to do anything. :)

Change 151808 had a related patch set uploaded by Audiodude:
Make transferbot exit cleanly when no arguments given.

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

Change 151808 merged by jenkins-bot:
Make transferbot exit cleanly when no arguments given.

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

jayvdb set Security to None.