From: Zac Medico Date: Mon, 16 May 2011 07:21:03 +0000 (-0700) Subject: BinpkgFetcher: handle AsynchronousLock failure X-Git-Tag: v2.1.9.50~90 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4780c4916f10cb2f54827c3620eb0567b468ebc8;p=portage.git BinpkgFetcher: handle AsynchronousLock failure --- diff --git a/pym/_emerge/BinpkgFetcher.py b/pym/_emerge/BinpkgFetcher.py index 221d9a7ff..12544d1be 100644 --- a/pym/_emerge/BinpkgFetcher.py +++ b/pym/_emerge/BinpkgFetcher.py @@ -158,7 +158,12 @@ class BinpkgFetcher(SpawnProcess): async_lock = AsynchronousLock(path=self.pkg_path, scheduler=self.scheduler) async_lock.start() - async_lock.wait() + + if async_lock.wait() != os.EX_OK: + # TODO: Use CompositeTask for better handling, like in EbuildPhase. + raise AssertionError("AsynchronousLock failed with returncode %s" \ + % (async_lock.returncode,)) + self._lock_obj = async_lock self.locked = True