fixed ip routes, removed maps

master 3.7.1.5
idzuibenko 3 years ago
parent 7965493b9b
commit 01cd79f702

@ -103,7 +103,7 @@ class cpProcessProgress(processProgress):
self.value += 1
if self.maxfiles:
percent = 100 * self.value // self.maxfiles
# percent = min(percent, 99)
percent = min(percent, 100)
if percent > self.percent:
self.percent = percent
return percent

@ -452,7 +452,8 @@ class migrate():
os.chmod(homedir, perms)
users = list(set([x[0] for x in addUsersList] + existsMigrateUsers) - {"root"})
try:
map(createHome, (x for x in self.dataUsers if x[0] in users))
# map(createHome, (x for x in self.dataUsers if x[0] in users))
[createHome(x) for x in self.dataUsers if x[0] in users]
except Exception as e:
raise MigrationError(
_("Failed to create the user's home directory"))

@ -917,13 +917,13 @@ class VariableOsLocationBriefData(LocationHelper, TableVariable):
else:
return -1, dev
devices = map(list, self.ZipVars(
devices = list(map(list, self.ZipVars(
'os_install_disk_dev',
'os_install_disk_mount',
'os_install_disk_format',
'os_install_disk_perform_format',
'os_install_disk_size',
humanreadable=hr))
humanreadable=hr)))
binds = [[dev, mp, "", "", ""]
for dev, mp in self.ZipVars(
@ -1126,8 +1126,7 @@ class VariableOsLocationDest(LocationHelper, Variable):
return path.normpath(val)
return val
value = map(normpath, value)
return [x or "/" for x in value]
return [x or "/" for x in map(normpath, value)]
def choice(self):
if self.Get('cl_install_type') == 'flash':

@ -226,11 +226,11 @@ class DistroRepository(Linux):
def _findLatestFile(self, dirs, reMatch, keyfunc):
"""Find latest file in dirs, which match by reMatch,
comparable part get by keyfunc"""
existsdirs = filter(path.exists, dirs)
listimgs = reduce(lambda x, y: x + map(
existsdirs = list(filter(path.exists, dirs))
listimgs = reduce(lambda x, y: x + list(map(
lambda x: reMatch.search(
path.join(y, x)),
listDirectory(y)),
listDirectory(y))),
existsdirs, [])
listimgs = [x for x in listimgs if x]
if listimgs:

@ -562,7 +562,7 @@ class VariableOsInstallNetRouteData(NetHelper, TableVariable):
else:
wrapper = lambda x: x
self.value = self.set(map(wrapper,value))
self.value = self.set([wrapper(x) for x in value])
self.wasSet = True
self.invalid = False
# run check

Loading…
Cancel
Save