--version causes type error

Bug #1003230 reported by launchpad@estestm.com on 2012-05-23
This bug affects 3 people
Affects Status Importance Assigned to Milestone
vm-builder (Ubuntu)

Bug Description

Expected result: a version number
Actual result:

root@rock:/var/virtual_machines# vmbuilder --version
Traceback (most recent call last):
  File "/usr/bin/vmbuilder", line 24, in <module>
  File "/usr/lib/python2.7/dist-packages/VMBuilder/contrib/cli.py", line 139, in main
    (dummy, args) = optparser.parse_args(sys.argv[1:])
  File "/usr/lib/python2.7/optparse.py", line 1399, in parse_args
    stop = self._process_args(largs, rargs, values)
  File "/usr/lib/python2.7/optparse.py", line 1439, in _process_args
    self._process_long_opt(rargs, values)
  File "/usr/lib/python2.7/optparse.py", line 1514, in _process_long_opt
    option.process(opt, value, values, self)
  File "/usr/lib/python2.7/optparse.py", line 788, in process
    self.action, self.dest, opt, value, values, parser)
  File "/usr/lib/python2.7/optparse.py", line 808, in take_action
    self.callback(self, opt, value, parser, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/VMBuilder/contrib/cli.py", line 281, in versioninfo
TypeError: %d format: a number is required, not str


Ubuntu 12.04 server
Just did apt-get update && apt-get upgrade

Scott Moser (smoser) wrote :

This seems to have been broken for quite some time.
Simplist fix is to just remove 'revno' from the output message:

=== modified file 'VMBuilder/contrib/cli.py'
--- VMBuilder/contrib/cli.py 2011-10-27 20:01:00 +0000
+++ VMBuilder/contrib/cli.py 2012-05-24 13:13:29 +0000
@@ -277,7 +277,7 @@

     def versioninfo(self, option, opt, value, parser):
- print ('%(major)d.%(minor)d.%(micro)s.r%(revno)d' %
+ print ('%(major)d.%(minor)d.%(micro)s' %

Changed in vm-builder (Ubuntu):
importance: Undecided → Medium
status: New → Confirmed
Changed in vmbuilder:
status: New → Confirmed
importance: Undecided → Medium
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package vm-builder - 0.12.4+bzr480-0ubuntu1

vm-builder (0.12.4+bzr480-0ubuntu1) quantal; urgency=low

  * Patch from Alex Dehnert (adehnert) to fix tmpfs unmounting failure
    (LP: #1008225)
  * From Scott Moser: fix vmbuilder --version output (LP: #1003230)
 -- Serge Hallyn <email address hidden> Mon, 23 Jul 2012 23:10:58 -0500

Changed in vm-builder (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers