From 4780c4916f10cb2f54827c3620eb0567b468ebc8 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 16 May 2011 00:21:03 -0700 Subject: [PATCH] BinpkgFetcher: handle AsynchronousLock failure --- pym/_emerge/BinpkgFetcher.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 -- 2.26.2