From: Zac Medico Date: Sat, 21 Aug 2010 22:16:10 +0000 (-0700) Subject: Fix UnboundLocalError for catdir inside dblink.unmerge(). X-Git-Tag: v2.2_rc68~27 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7ce22c6804c60ee6c0dcee129458132dca4aa081;p=portage.git Fix UnboundLocalError for catdir inside dblink.unmerge(). --- 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: