summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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: