From: Zac Medico Date: Tue, 7 Oct 2008 08:04:55 +0000 (-0000) Subject: Fix EbuildFetcher._wait_hook() so it can be called more than once without X-Git-Tag: v2.2_rc12~19 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ded1a397f2d0eecbf24caa8d9dbfda843765b5ac;p=portage.git Fix EbuildFetcher._wait_hook() so it can be called more than once without throwing an AttributeError. svn path=/main/trunk/; revision=11646 --- diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 4e9070612..cffaf5426 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -2278,16 +2278,17 @@ class EbuildFetcher(SpawnProcess): def _wait_hook(self): # Collect elog messages that might have been # created by the pkg_nofetch phase. - portage.elog.elog_process(self.pkg.cpv, self._build_dir.settings) - try: - shutil.rmtree(self._build_dir.settings["PORTAGE_BUILDDIR"]) - except EnvironmentError, e: - if e.errno != errno.ENOENT: - raise - del e - self._build_dir.unlock() - self.config_pool.deallocate(self._build_dir.settings) - self._build_dir = None + if self._build_dir is not None: + portage.elog.elog_process(self.pkg.cpv, self._build_dir.settings) + try: + shutil.rmtree(self._build_dir.settings["PORTAGE_BUILDDIR"]) + except EnvironmentError, e: + if e.errno != errno.ENOENT: + raise + del e + self._build_dir.unlock() + self.config_pool.deallocate(self._build_dir.settings) + self._build_dir = None SpawnProcess._wait_hook(self) class EbuildBuildDir(SlotObject):