Re: [et-mgmt-tools] [PATCH][RESEND] "--file-size" option is ignored

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

 



Hi, Dan

Would you give me a comment on this patch?
If not, please apply it.

> When I execute "virt-install --file-size=10", 
> the value of "--file-size" option is ignored and the error message 
> "ERROR:  float() argument must be a string or a number" is output 
> after I answer "What would you like to use as the disk (path)?". 
> 
> The attached patch adds to solve this problem.
> 
> 
> Signed-off-by: Nobuhiro Itou <fj0873gn@xxxxxxxxxxxxxxxxx>


Thanks,
Nobuhiro Itou.


diff -r 95196b0f37a5 virt-install
--- a/virt-install      Mon Mar 12 12:39:59 2007 -0400
+++ b/virt-install      Tue Mar 13 15:55:13 2007 +0900
@@ -106,7 +106,10 @@ def get_disk(disk, size, sparse, guest,
 def get_disk(disk, size, sparse, guest, hvm):
     # FIXME: need to handle a list of disks at some point
     while 1:
-        disk = prompt_for_input("What would you like to use as the disk (path)?", disk)
+        msg = "What would you like to use as the disk (path)?"
+        if not size is None:
+            msg = "What would you like the size %sGB to use as the disk (path)?" %(size,)
+        disk = prompt_for_input(msg, disk)
         while 1:
             if os.path.exists(disk):
                 break
@@ -138,8 +141,13 @@ def get_disks(disk, size, sparse, guest,
             sys.exit(1)
     elif type(disk) == list:
         size = [ None ] * len(disk)
+    elif type(size) == list:
+        disk = [ None ] * len(size)

     if (type(disk) == list):
         map(lambda d, s: get_disk(d, s, sparse, guest, hvm),
             disk, size)
+    elif (type(size) == list):
+        map(lambda d, s: get_disk(d, s, sparse, guest, hvm),
+            disk, size)
     else:


[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