From 7a6a2598c417b0079036a37e3203d3451bb49654 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 26 Sep 2009 23:37:34 +0000 Subject: Bug #286522 - Check all portdbapi.findname return values in case it returns None, and raise 'ebuild not found' exceptions when necessary. svn path=/main/trunk/; revision=14442 --- pym/_emerge/Scheduler.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'pym/_emerge/Scheduler.py') diff --git a/pym/_emerge/Scheduler.py b/pym/_emerge/Scheduler.py index 78b9e57d8..b6f08307d 100644 --- a/pym/_emerge/Scheduler.py +++ b/pym/_emerge/Scheduler.py @@ -580,11 +580,8 @@ class Scheduler(PollScheduler): continue portdb = x.root_config.trees['porttree'].dbapi ebuild_path = portdb.findname(x.cpv) - if not ebuild_path: - writemsg_level( - "!!! Could not locate ebuild for '%s'.\n" \ - % x.cpv, level=logging.ERROR, noiselevel=-1) - return 1 + if ebuild_path is None: + raise AssertionError("ebuild not found for '%s'" % x.cpv) pkgsettings['O'] = os.path.dirname(ebuild_path) if not portage.digestgen([], pkgsettings, myportdb=portdb): writemsg_level( @@ -628,7 +625,10 @@ class Scheduler(PollScheduler): root_config = x.root_config portdb = root_config.trees["porttree"].dbapi quiet_config = quiet_settings[root_config.root] - quiet_config["O"] = os.path.dirname(portdb.findname(x.cpv)) + ebuild_path = portdb.findname(x.cpv) + if ebuild_path is None: + raise AssertionError("ebuild not found for '%s'" % x.cpv) + quiet_config["O"] = os.path.dirname(ebuild_path) if not portage.digestcheck([], quiet_config, strict=True): failures |= 1 -- cgit v1.2.3-1-g7c22