mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-11-17 07:48:18 +01:00
Fixed too many local variables
This commit is contained in:
parent
32512a1547
commit
5760af4070
1 changed files with 5 additions and 10 deletions
|
@ -178,13 +178,12 @@ class PackageManager(object):
|
||||||
removed, packages = self._get_removed()
|
removed, packages = self._get_removed()
|
||||||
if packages and "--checklist" in self.extra:
|
if packages and "--checklist" in self.extra:
|
||||||
removed = []
|
removed = []
|
||||||
data = packages
|
|
||||||
text = "Press 'spacebar' to unchoose packages from remove"
|
text = "Press 'spacebar' to unchoose packages from remove"
|
||||||
title = "Remove"
|
|
||||||
backtitle = "{0} {1}".format(self.meta.__all__,
|
backtitle = "{0} {1}".format(self.meta.__all__,
|
||||||
self.meta.__version__)
|
self.meta.__version__)
|
||||||
status = True
|
status = True
|
||||||
pkgs = DialogUtil(data, text, title, backtitle, status).checklist()
|
pkgs = DialogUtil(packages, text, " Remove ", backtitle,
|
||||||
|
status).checklist()
|
||||||
if pkgs:
|
if pkgs:
|
||||||
for rmv in pkgs:
|
for rmv in pkgs:
|
||||||
removed.append(split_package(rmv)[0])
|
removed.append(split_package(rmv)[0])
|
||||||
|
@ -233,13 +232,11 @@ class PackageManager(object):
|
||||||
if packages:
|
if packages:
|
||||||
if "--checklist" in self.extra:
|
if "--checklist" in self.extra:
|
||||||
deps, dependencies = [], []
|
deps, dependencies = [], []
|
||||||
data = packages
|
|
||||||
text = "Found dependencies for package {0}".format(package)
|
text = "Found dependencies for package {0}".format(package)
|
||||||
title = "Remove"
|
|
||||||
backtitle = "{0} {1}".format(self.meta.__all__,
|
backtitle = "{0} {1}".format(self.meta.__all__,
|
||||||
self.meta.__version__)
|
self.meta.__version__)
|
||||||
status = True
|
status = True
|
||||||
deps = DialogUtil(data, text, title, backtitle,
|
deps = DialogUtil(packages, text, " Remove ", backtitle,
|
||||||
status).checklist()
|
status).checklist()
|
||||||
for d in deps:
|
for d in deps:
|
||||||
dependencies.append("-".join(d.split("-")[:-1]))
|
dependencies.append("-".join(d.split("-")[:-1]))
|
||||||
|
@ -329,15 +326,13 @@ class PackageManager(object):
|
||||||
dependency.append(rmv)
|
dependency.append(rmv)
|
||||||
if package:
|
if package:
|
||||||
if "--checklist" in self.extra:
|
if "--checklist" in self.extra:
|
||||||
data = pkg_dep
|
|
||||||
text = ("Press 'spacebar' to choose packages to exception "
|
text = ("Press 'spacebar' to choose packages to exception "
|
||||||
"remove")
|
"remove")
|
||||||
title = "!!! WARNING !!!"
|
|
||||||
backtitle = "{0} {1}".format(self.meta.__all__,
|
backtitle = "{0} {1}".format(self.meta.__all__,
|
||||||
self.meta.__version__)
|
self.meta.__version__)
|
||||||
status = False
|
status = False
|
||||||
choose = DialogUtil(data, text, title, backtitle,
|
choose = DialogUtil(pkg_dep, text, " !!! WARNING !!! ",
|
||||||
status).checklist()
|
backtitle, status).checklist()
|
||||||
for pkg in choose:
|
for pkg in choose:
|
||||||
self.skip.append(pkg.split()[0])
|
self.skip.append(pkg.split()[0])
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue