diff options
author | Chris Lumens <clumens@redhat.com> | 2009-04-16 16:28:49 -0400 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2009-05-12 11:34:11 -0400 |
commit | 07654ca769fa627616c37277474bd4fe65cea4ec (patch) | |
tree | 57f56662931dccad6a6737f0d9e8e6aa83c1b756 /storage/__init__.py | |
parent | 2b5ce434500c5b7d53df3e0e9a286c9bb8181477 (diff) | |
download | anaconda-07654ca769fa627616c37277474bd4fe65cea4ec.tar.gz anaconda-07654ca769fa627616c37277474bd4fe65cea4ec.tar.xz anaconda-07654ca769fa627616c37277474bd4fe65cea4ec.zip |
Add support for --noformat too.
Diffstat (limited to 'storage/__init__.py')
-rw-r--r-- | storage/__init__.py | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/storage/__init__.py b/storage/__init__.py index b6184756d..9ce3454ce 100644 --- a/storage/__init__.py +++ b/storage/__init__.py @@ -990,7 +990,6 @@ class Storage(object): # the various partitioning commands dict = {} - ordering = [] actions = filter(lambda x: x.device.format.type != "luks", self.devicetree.findActions(type="create")) @@ -999,12 +998,19 @@ class Storage(object): dict[action.device.path].append(action) else: dict[action.device.path] = [action] - ordering.append(action.device.path) - for path in ordering: - for device in map(lambda x: x.device, dict[path]): - device.writeKS(f, preexisting=useExisting(dict[path])) - f.write("\n") + for device in self.devices: + # If there's no action for the given device, it must be one + # we are reusing. + if not dict.has_key(device.path): + noformat = True + preexisting = True + else: + noformat = False + preexisting = useExisting(dict[device.path]) + + device.writeKS(f, preexisting=preexisting, noformat=noformat) + f.write("\n") self.iscsi.writeKS(f) self.zfcp.writeKS(f) |