[PATCH] bugzillaID:329091

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

 



Hi

I make a patch of BugzillaID-329091.
https://bugzilla.redhat.com/show_bug.cgi?id=329091

Thanks,
Shigeki Sakamoto.

----------------------------------------------------------------------
diff -r 531b73491ac2 virt-install
--- a/virt-install	Wed Oct 10 14:24:48 2007 -0400
+++ b/virt-install	Tue Oct 16 16:01:29 2007 +0900
@@ -15,6 +15,7 @@
 
 
 import os, sys, string
+from stat import *
 from optparse import OptionParser, OptionValueError
 import subprocess
 import logging
@@ -48,10 +49,10 @@ def get_disk(disk, size, sparse, guest, 
         if not size is None:
             msg = _("Please enter the path to the file you would like to use for storage. It will have size %sGB.") %(size,)
         disk = cli.prompt_for_input(msg, disk)
-        if os.path.exists(disk) and os.path.isfile(disk):
+        if os.path.exists(disk) and ( S_ISBLK(os.stat(disk)[ST_MODE]) or S_ISREG(os.stat(disk)[ST_MODE]) ):
             while 1:
                 retryFlg = False
-                warnmsg = _("You are going to overwrite file '%s'!\n") % disk
+                warnmsg = _("You are going to overwrite '%s'!\n") % disk
                 res = cli.prompt_for_input(warnmsg + _("Do you really want to use the file (yes or no)? "))
                 try:
                     if cli.yes_or_no(res) is True:
----------------------------------------------------------------------

_______________________________________________
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