~smoser/curtin/merge-critical

« back to all changes in this revision

Viewing changes to curtin/commands/mkfs.py

  • Committer: Scott Moser
  • Date: 2015-11-16 17:36:15 UTC
  • Revision ID: smoser@ubuntu.com-20151116173615-i5r2tv0qm90lly3m
fix stacktrace and output on bad argument to mkfs

Running 'mkfs asdf' would stack trace.
Then, after fixing that fix the error message which was poorly quoted.

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
       'default': 'ext4', 'action': 'store'}),
39
39
     (('-c', '--config'),
40
40
      {'help': 'read configuration from cfg', 'action': 'append',
41
 
       'metavar': 'CONFIG', 'dest': 'cfgopts'})
 
41
       'metavar': 'CONFIG', 'dest': 'cfgopts', 'default': []})
42
42
     )
43
43
)
44
44
 
111
111
            format_blockdev(device, args.fstype)
112
112
        else:
113
113
            # Bad argument
114
 
            raise ValueError("device '%s' is neither an item in storage \
115
 
                config nor a block device" % device)
 
114
            raise ValueError("device '%s' is neither an item in storage "
 
115
                             "config nor a block device" % device)
116
116
 
117
117
    sys.exit(0)
118
118