From 7ce22c6804c60ee6c0dcee129458132dca4aa081 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 21 Aug 2010 15:16:10 -0700 Subject: Fix UnboundLocalError for catdir inside dblink.unmerge(). --- pym/portage/dbapi/vartree.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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: -- cgit v1.2.3-1-g7c22