[PATCH] virtinst: fix --disk option parsing error message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
the description is far longer than the patch:

ERROR    not all arguments converted during string formatting
Traceback (most recent call last):
  File "./virt-install", line 715, in <module>
    main()
  File "./virt-install", line 572, in main
    options.sparse, options.nodisks, guest, hvm, conn)
  File "./virt-install", line 243, in get_disks
    is_file_path), disk, size)
  File "./virt-install", line 243, in <lambda>
    is_file_path), disk, size)
  File "./virt-install", line 188, in get_disk
    size, sparse) = parse_disk_option(guest, disk, size)
  File "./virt-install", line 139, in parse_disk_option
    fail(_("Unknown --disk option '%s'." % opt))
TypeError: not all arguments converted during string formatting

Attached patch makes sure the tuple opt is converted to a string:

ERROR    Unknown --disk option '('device', 'disk')'.

 -- Guido
# HG changeset patch
# User Guido Günther <agx@xxxxxxxxxxx>
# Date 1225371102 -3600
# Node ID 8afae838ae9b6151e285063f35647741235a9996
# Parent  7fcd21b2825b73388b73ab367970d14f8792315f
Opt is a tuple. Withouth this we get

ERROR    not all arguments converted during string formatting

instead of a reasonable error message.

diff -r 7fcd21b2825b -r 8afae838ae9b virt-install
--- a/virt-install	Thu Oct 30 13:51:35 2008 +0100
+++ b/virt-install	Thu Oct 30 13:51:42 2008 +0100
@@ -136,7 +136,7 @@
             else:
                 fail(_("Unknown '%s' value '%s'") % (opt_type, opt_val))
         else:
-            fail(_("Unknown --disk option '%s'." % opt))
+            fail(_("Unknown --disk option '%s'.") % (opt,))
 
     # We return (path, (poolname, volname), volinst, device, bus, readonly, shared)
     if path_type == "path=":
_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/et-mgmt-tools

[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux