----- Original Message -----
From: "Vratislav Podzimek" vpodzime@redhat.com To: anaconda-patches@lists.fedorahosted.org Sent: Friday, February 20, 2015 9:06:56 AM Subject: [PATCH 1/2] Replace filter() call with list comprehension
The list comprehension works the same way in both Python 2 and Python 3.
Signed-off-by: Vratislav Podzimek vpodzime@redhat.com
src/parted/disk.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/parted/disk.py b/src/parted/disk.py index 3f293e2..a450c08 100644 --- a/src/parted/disk.py +++ b/src/parted/disk.py @@ -395,7 +395,7 @@ class Disk(object): return None
def __filterPartitions(self, fn):
return filter(fn, self.partitions)
return [part for part in self.partitions if fn(part)]
def getLogicalPartitions(self): """Return a list of logical Partitions on this Disk."""
-- 2.1.0
anaconda-patches mailing list anaconda-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
Ack.
- mulhern