diff --git a/pym/update/profile.py b/pym/update/profile.py index 577260b..827aa72 100644 --- a/pym/update/profile.py +++ b/pym/update/profile.py @@ -158,7 +158,7 @@ class Profile(object): @classmethod def from_string(cls, repository, s): - parts = list(filter(None, s.split())) + parts = [x for x in s.split() if x] if len(parts) == 3 and parts[0] in cls.available_arch: return Profile(repository, parts[1], parts[0]) return None diff --git a/pym/update/update.py b/pym/update/update.py index efb6377..d2b0f3e 100644 --- a/pym/update/update.py +++ b/pym/update/update.py @@ -156,8 +156,8 @@ class Update(MethodsInterface): EmergeCache.logger.logger.setLevel(logging.WARNING) self.emerge_cache.check_list = ( self.emerge_cache.check_list + - map(lambda x:emerge_parser.GitCheckvalue(x, self.getGit()), - self.clVars.Get('update.cl_update_rep_path'))) + [emerge_parser.GitCheckvalue(x, self.getGit()) for x + in self.clVars.Get('update.cl_update_rep_path')]) self.update_map = {} self.refresh_binhost = False self.pkgnum = None @@ -370,7 +370,6 @@ class Update(MethodsInterface): makeDirectory(reposdir) os.rename(layman_fullname, repos_fullname) os.symlink(symlink_target, layman_fullname) - #print "MYDEBUG", reposdir, laymandir, rpath_orig self.endTask(True) return True diff --git a/pym/update/update_info.py b/pym/update/update_info.py index e0bb750..962ce60 100644 --- a/pym/update/update_info.py +++ b/pym/update/update_info.py @@ -70,7 +70,7 @@ class UpdateInfo(object): """ Проверить есть ли уже запущенная копия console-gui """ - return any(list(filter(lambda x: "cl-console-gui" in x, getRunCommands()))) + return any([x for x in getRunCommands() if "cl-console-gui" in x]) def update_already_run(self): """ diff --git a/pym/update/variables/update.py b/pym/update/variables/update.py index 5f9c7fa..6d28dcb 100644 --- a/pym/update/variables/update.py +++ b/pym/update/variables/update.py @@ -453,8 +453,7 @@ class VariableClUpdateSyncOverlayRep(ReadonlyVariable): type = "list" def get(self): - return list(filter(lambda x: x not in ("portage", "gentoo"), - self.Get('cl_update_sync_rep'))) + return [x for x in self.Get('cl_update_sync_rep') if x not in ("portage", "gentoo")] class VariableClUpdateOutdateSet(ReadonlyVariable): @@ -828,7 +827,7 @@ class VariableClUpdateTemplatesLocate(Variable): def choice(self): descr = lambda x: self.descriptionMap.get(x, _("%s overlay templates" % x)) - return list(map(lambda x: (x, descr(x)), self.get())) + return [(x, descr(x)) for x in self.get()] class VariableClUpdateProfileDependName(FieldValue, ReadonlyVariable):