summaryrefslogtreecommitdiffstats
path: root/partIntfHelpers.py
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>2002-06-27 16:01:19 +0000
committerMike Fulbright <msf@redhat.com>2002-06-27 16:01:19 +0000
commitcccde1d05a5cc7f2dc446731db17d8680dc7ab55 (patch)
tree5dd2e63bf0251bda00bc848879593aab86caa861 /partIntfHelpers.py
parent574f813b90527b45d293460a833116c19790f954 (diff)
downloadanaconda-cccde1d05a5cc7f2dc446731db17d8680dc7ab55.tar.gz
anaconda-cccde1d05a5cc7f2dc446731db17d8680dc7ab55.tar.xz
anaconda-cccde1d05a5cc7f2dc446731db17d8680dc7ab55.zip
make mode to be quiet
Diffstat (limited to 'partIntfHelpers.py')
-rw-r--r--partIntfHelpers.py20
1 files changed, 11 insertions, 9 deletions
diff --git a/partIntfHelpers.py b/partIntfHelpers.py
index dba60552d..8381994de 100644
--- a/partIntfHelpers.py
+++ b/partIntfHelpers.py
@@ -212,16 +212,18 @@ def doDeletePartitionByRequest(intf, requestlist, partition,
del partition
return 1
-def doDeletePartitionsByDevice(intf, requestlist, diskset, device):
+def doDeletePartitionsByDevice(intf, requestlist, diskset, device,
+ confirm=1, quiet=0):
""" Remove all partitions currently on device """
- rc = intf.messageWindow(_("Confirm Delete"),
- _("You are about to delete all partitions on "
- "the device '/dev/%s'.") % (device,),
- type="custom",
- custom_buttons=[_("Cancel"), _("_Delete")])
+ if confirm:
+ rc = intf.messageWindow(_("Confirm Delete"),
+ _("You are about to delete all partitions on "
+ "the device '/dev/%s'.") % (device,),
+ type="custom",
+ custom_buttons=[_("Cancel"), _("_Delete")])
- if not rc:
- return
+ if not rc:
+ return
requests = requestlist.getRequestsByDevice(diskset, device)
if not requests:
@@ -249,7 +251,7 @@ def doDeletePartitionsByDevice(intf, requestlist, diskset, device):
if newreq:
outlist = outlist + "\t/dev/%s\n" % (newreq.device,)
- if outlist != "":
+ if outlist != "" and not quiet:
intf.messageWindow(_("Notice"),
_("The following partitions were not deleted "
"because they are in use:\n\n%s") % outlist)