New issue
Advanced search Search tips

Issue 630249 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

cit: UnboundLocalError if I make a typo in tool name

Project Member Reported by tandrii@chromium.org, Jul 21 2016

Issue description

Here: https://cs.chromium.org/chromium/tools/depot_tools/cit.py?type=cs&q=%22cmd+%3D+%5Bcipd_file%5D%22&sq=package:chromium&l=117

Traceback (most recent call last):
  File "/b/depot_tools/cit.py", line 158, in <module>
    sys.exit(main())
  File "/b/depot_tools/cit.py", line 155, in main
    return run(args.args)
  File "/b/depot_tools/cit.py", line 120, in run
    cmd.extend(args[1:])
UnboundLocalError: local variable 'cmd' referenced before assignment
 

Comment 1 by hinoka@chromium.org, Jul 21 2016

Clearly, this calls for a levenshtein distance calculator in cit.py
Labels: Pri-2
Status: Assigned (was: Untriaged)
Labels: Type-Bug
Owner: tandrii@chromium.org
Status: Fixed (was: Assigned)
Someone fixed this at some point (tandrii?)

$ cit absdfsad
Unknown tool "absdfsad"
usage: cit.py <name of tool> [args for tool]

  Wrapper for maintaining and calling tools in:
    "infra.git/run.py infra.tools.*"
    "infra.git/cipd/*"

  Available infra tools are:
  * bot_setup.start
  * bucket
  * buildbot
  * cq_stats
  * cros_pin
  * dumpthis
  * log
  * master_cleaner
  * master_manager
  * new_app
  * new_tool
  * restart
  * send_monitoring_event
  * send_ts_mon_values
  * zip_release_commits

  Available cipd tools are:
  * authutil
  * cipd
  * protoc

Sign in to add a comment