diff options
author | Tim Harder <radhermit@gmail.com> | 2016-03-02 00:59:41 -0500 |
---|---|---|
committer | Tim Harder <radhermit@gmail.com> | 2016-03-03 23:04:03 -0500 |
commit | 1d47909f5cae69017c573b47a8decbcfd4b148a2 (patch) | |
tree | 7c347488c659f36fc8ee22f9f2c0dc4822dec053 | |
parent | ebuild/eapi: merge get_unsupported_eapi() into get_eapi() (diff) | |
download | pkgcore-1d47909f5cae69017c573b47a8decbcfd4b148a2.tar.gz pkgcore-1d47909f5cae69017c573b47a8decbcfd4b148a2.tar.bz2 pkgcore-1d47909f5cae69017c573b47a8decbcfd4b148a2.zip |
pclean tmp: use better variable names
-rw-r--r-- | pkgcore/scripts/pclean.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pkgcore/scripts/pclean.py b/pkgcore/scripts/pclean.py index b97b789a..62853337 100644 --- a/pkgcore/scripts/pclean.py +++ b/pkgcore/scripts/pclean.py @@ -269,14 +269,14 @@ def _tmp_validate_args(parser, namespace): if namespace.restrict and not namespace.wipeall: # create a fake repo from tmpdir entries and pull matches from it - pkgs = {} - for x in glob.glob(pjoin(tmpdir, '*', '*')): + pkg_map = {} + for pkg_build_dir in glob.glob(pjoin(tmpdir, '*', '*')): try: - pkg = atom.atom('=' + x[len(tmpdir):].lstrip(os.path.sep)) + pkg = atom.atom('=' + pkg_build_dir[len(tmpdir):].lstrip(os.path.sep)) except atom.MalformedAtom: continue - pkgs.setdefault(pkg.category, {}).setdefault(pkg.package, []).append(pkg.fullver) - repo = SimpleTree(pkgs) + pkg_map.setdefault(pkg.category, {}).setdefault(pkg.package, []).append(pkg.fullver) + repo = SimpleTree(pkg_map) dirs = ((partial(shutil.rmtree), pjoin(tmpdir, pkg.cpvstr)) for pkg in repo.itermatch(namespace.restrict)) else: |