summaryrefslogtreecommitdiffstats
path: root/partIntfHelpers.py
diff options
context:
space:
mode:
authorDavid Lehman <dlehman@redhat.com>2009-02-27 10:18:46 -0600
committerDavid Lehman <dlehman@redhat.com>2009-02-27 10:18:46 -0600
commit77e052201c1aa258def5fdde5c9b8745b79611f2 (patch)
treeebcdf7465fc944b97bd0b008a82cef0cb1d998ba /partIntfHelpers.py
parentaddec40bb65f80a7f38166c5c87561d362b31fc9 (diff)
downloadanaconda-77e052201c1aa258def5fdde5c9b8745b79611f2.tar.gz
anaconda-77e052201c1aa258def5fdde5c9b8745b79611f2.tar.xz
anaconda-77e052201c1aa258def5fdde5c9b8745b79611f2.zip
Lots of minor fixes and cleanups. A non-exhaustive list follows.
- Change minsize/maxsize to minSize/maxSize since that's the convention elsewhere throughout the code. - Redirect output from all external utilities to tty5, not /dev/null. - Don't waste calls to basename for debug log statements, especially when the device can be None. - Add lots of missing imports. - Fix lots of remnants of previous code usage.
Diffstat (limited to 'partIntfHelpers.py')
-rw-r--r--partIntfHelpers.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/partIntfHelpers.py b/partIntfHelpers.py
index 23fbf00f3..080c0cfa5 100644
--- a/partIntfHelpers.py
+++ b/partIntfHelpers.py
@@ -28,6 +28,7 @@ import string
from constants import *
import parted
import iutil
+from storage.formats import getFormat
import gettext
_ = lambda x: gettext.ldgettext("anaconda", x)
@@ -155,7 +156,7 @@ def doDeleteDependentDevices(intf, storage, device, confirm=1, quiet=0):
# nothing to do
return False
- immmutable = []
+ immutable = []
for dep in deps:
if storage.deviceImmutable(dep):
immutable.append(dep.path)
@@ -164,10 +165,10 @@ def doDeleteDependentDevices(intf, storage, device, confirm=1, quiet=0):
storage.destroyDevice(dep)
if immutable and not quiet:
- remaining = "\n\t" + "\n\t".join(immutable) + "\n"
+ remaining = "\t" + "\n\t".join(immutable) + "\n"
intf.messageWindow(_("Notice"),
_("The following partitions were not deleted "
- "because they are in use:\n\n%s") % outlist,
+ "because they are in use:\n\n%s") % remaining,
custom_icon="warning")
return True
@@ -179,7 +180,7 @@ def checkForSwapNoMatch(anaconda):
# this is only for existing partitions
continue
- if device.partType & parted.PARTITION_SWAP and \
+ if device.getFlag(parted.PARTITION_SWAP) and \
not device.format.type == "swap":
rc = anaconda.intf.messageWindow(_("Format as Swap?"),
_("%s has a partition type of 0x82 "
@@ -288,7 +289,7 @@ def confirmDelete(intf, device):
"will be lost!") % device.name)
elif device.type == "lvmlv":
errmsg = (_("You are about to delete the logical volume \"%s\".")
- % (device.name)
+ % device.name)
elif device.type == "mdarray":
errmsg = _("You are about to delete a RAID device.")
elif device.type == "partition":