Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian User (http://www.linux-archive.org/debian-user/)
-   -   platform.checkBootRequest(): Fix use of map instead of filter (http://www.linux-archive.org/debian-user/322637-platform-checkbootrequest-fix-use-map-instead-filter.html)

Chris Lumens 02-08-2010 03:49 PM

platform.checkBootRequest(): Fix use of map instead of filter
 
> diff --git a/platform.py b/platform.py
> index a19ce36..3805402 100644
> --- a/platform.py
> +++ b/platform.py
> @@ -140,7 +140,7 @@ class Platform(object):
> errors.append(_("Bootable partitions cannot be on an encrypted block device"))
> else:
> # Handle encrypted boot on more complicated devices.
> - for dev in map(lambda d: d.type == "luks/dm-crypt", self.anaconda.id.storage.devices):
> + for dev in filter(lambda d: d.type == "luks/dm-crypt", self.anaconda.id.storage.devices):
> if req in self.anaconda.id.storage.deviceDeps(dev):
> errors.append(_("Bootable partitions cannot be on an encrypted block device"))

Good catch. Note this will need to be slightly changed now that
self.anaconda.id no longer exists.

- Chris

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


All times are GMT. The time now is 12:17 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.