python error when using 'sudo snappy install' with no args

Bug #1400805 reported by Chris J Arges
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snappy
Fix Released
Wishlist
Michael Vogt

Bug Description

$ sudo snappy install
Usage:snappy [-h] [-v]
             {info,versions,search,update-versions,update,rollback,install,uninstall,tags,build,chroot,framework,fake-version,nap}
             ...
Traceback (most recent call last):
  File "/usr/bin/snappy", line 9, in <module>
    status = Main().__main__()
  File "/usr/lib/python3/dist-packages/snappy/main.py", line 159, in __main__
    return callback(args)
  File "/usr/lib/python3/dist-packages/snappy/main.py", line 368, in _do_install
    + packages + [package]
UnboundLocalError: local variable 'package' referenced before assignment

Seems like we should catch this exception before and display usage or a warning to the user.

Revision history for this message
Alexander Sack (asac) wrote :

mvo: another case to wrap in our general console experience "error reporting"; need to design and make this clean.

Changed in snappy-ubuntu:
assignee: nobody → Michael Vogt (mvo)
importance: Undecided → Wishlist
status: New → Confirmed
tags: added: snappy-xp-console
Martin Pitt (pitti)
information type: Embargoed → Public
Revision history for this message
Michael Vogt (mvo) wrote :

$ sudo snappy install
package name is required

Changed in snappy-ubuntu:
status: Confirmed → Fix Released
Michael Terry (mterry)
affects: snappy-ubuntu → snappy
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.