mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-05-13 19:41:29 +00:00
Replace map() with list comprehensions
As a bonus this removes a use of string.strip (not in python3). Signed-off-by: Julien Cristau <jcristau@debian.org>
This commit is contained in:
parent
94666b55f9
commit
4249d3868a
@ -183,7 +183,6 @@ from __future__ import print_function
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import string
|
|
||||||
import time
|
import time
|
||||||
import optparse
|
import optparse
|
||||||
import urllib
|
import urllib
|
||||||
@ -389,7 +388,7 @@ class Britney(object):
|
|||||||
arches += [x for x in allarches if x not in arches and x not in self.options.break_arches.split()]
|
arches += [x for x in allarches if x not in arches and x not in self.options.break_arches.split()]
|
||||||
arches += [x for x in allarches if x not in arches and x not in self.options.new_arches.split()]
|
arches += [x for x in allarches if x not in arches and x not in self.options.new_arches.split()]
|
||||||
arches += [x for x in allarches if x not in arches]
|
arches += [x for x in allarches if x not in arches]
|
||||||
self.options.architectures = map(intern, arches)
|
self.options.architectures = [intern(arch) for arch in arches]
|
||||||
self.options.smooth_updates = self.options.smooth_updates.split()
|
self.options.smooth_updates = self.options.smooth_updates.split()
|
||||||
|
|
||||||
def __log(self, msg, type="I"):
|
def __log(self, msg, type="I"):
|
||||||
@ -641,7 +640,7 @@ class Britney(object):
|
|||||||
|
|
||||||
# register virtual packages and real packages that provide them
|
# register virtual packages and real packages that provide them
|
||||||
if dpkg[PROVIDES]:
|
if dpkg[PROVIDES]:
|
||||||
parts = map(string.strip, dpkg[PROVIDES].split(","))
|
parts = [p.strip() for p in dpkg[PROVIDES].split(",")]
|
||||||
for p in parts:
|
for p in parts:
|
||||||
if p not in provides:
|
if p not in provides:
|
||||||
provides[p] = []
|
provides[p] = []
|
||||||
|
Loading…
x
Reference in New Issue
Block a user