summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-08-21 15:16:10 -0700
committerZac Medico <zmedico@gentoo.org>2010-08-21 15:16:10 -0700
commit7ce22c6804c60ee6c0dcee129458132dca4aa081 (patch)
treed26ddf5e9b47535d782c0efb3e3f8752a928bb83
parenta1a3532956489f308dedf04acf6fd6377b02d4e1 (diff)
downloadportage-7ce22c6804c60ee6c0dcee129458132dca4aa081.tar.gz
portage-7ce22c6804c60ee6c0dcee129458132dca4aa081.tar.bz2
portage-7ce22c6804c60ee6c0dcee129458132dca4aa081.zip
Fix UnboundLocalError for catdir inside dblink.unmerge().
-rw-r--r--pym/portage/dbapi/vartree.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index a804652bc..f986c0a3c 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -2175,6 +2175,7 @@ class dblink(object):
myebuildpath = None
ebuild_phase = "prerm"
log_path = None
+ catdir = None
mystuff = os.listdir(self.dbdir)
for x in mystuff:
if x.endswith(".ebuild"):
@@ -2345,7 +2346,7 @@ class dblink(object):
finally:
unlockdir(builddir_lock)
try:
- if not catdir_lock:
+ if catdir and not catdir_lock:
# Lock catdir for removal if empty.
catdir_lock = lockdir(catdir)
finally: