From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 3445E13888F for ; Thu, 8 Oct 2015 00:01:13 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3B07221C01B; Thu, 8 Oct 2015 00:01:11 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id AABE421C01B for ; Thu, 8 Oct 2015 00:01:10 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id ACAED340775 for ; Thu, 8 Oct 2015 00:01:09 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 56AA5B3E for ; Thu, 8 Oct 2015 00:01:06 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <1444262326.bf62f8954f087b4f2e1158eb7c62b7a03d5dd9a1.dolsen@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: pym/_emerge/Scheduler.py X-VCS-Directories: pym/_emerge/ X-VCS-Committer: dolsen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: bf62f8954f087b4f2e1158eb7c62b7a03d5dd9a1 X-VCS-Branch: master Date: Thu, 8 Oct 2015 00:01:06 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 503dc4ca-0e00-43ed-a09e-e3b09e0ff88b X-Archives-Hash: d4c80f07b6e4e0fa72646276e38da091 commit: bf62f8954f087b4f2e1158eb7c62b7a03d5dd9a1 Author: James Broadhead twitter com> AuthorDate: Wed Oct 7 23:58:46 2015 +0000 Commit: Brian Dolbec gentoo org> CommitDate: Wed Oct 7 23:58:46 2015 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=bf62f895 _emerge/Scheduler.py: Add FAILURE enum pym/_emerge/Scheduler.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/pym/_emerge/Scheduler.py b/pym/_emerge/Scheduler.py index 968af6c..20a4e85 100644 --- a/pym/_emerge/Scheduler.py +++ b/pym/_emerge/Scheduler.py @@ -65,6 +65,10 @@ from _emerge.SequentialTaskQueue import SequentialTaskQueue if sys.hexversion >= 0x3000000: basestring = str +# enums +FAILURE = 1 + + class Scheduler(PollScheduler): # max time between loadavg checks (milliseconds) @@ -641,7 +645,7 @@ class Scheduler(PollScheduler): writemsg_level( "!!! Unable to generate manifest for '%s'.\n" \ % x.cpv, level=logging.ERROR, noiselevel=-1) - return 1 + return FAILURE return os.EX_OK @@ -673,7 +677,7 @@ class Scheduler(PollScheduler): out = portage.output.EOutput() for line in textwrap.wrap(msg, 70): out.eerror(line) - return 1 + return FAILURE return os.EX_OK @@ -719,7 +723,7 @@ class Scheduler(PollScheduler): failures |= 1 if failures: - return 1 + return FAILURE return os.EX_OK def _add_prefetchers(self): @@ -934,7 +938,7 @@ class Scheduler(PollScheduler): build_dir.unlock() if failures: - return 1 + return FAILURE return os.EX_OK def merge(self): @@ -949,7 +953,7 @@ class Scheduler(PollScheduler): try: self._background = self._background_mode() except self._unknown_internal_error: - return 1 + return FAILURE rval = self._handle_self_update() if rval != os.EX_OK: @@ -971,7 +975,7 @@ class Scheduler(PollScheduler): out = portage.output.EOutput() for l in msg: out.eerror(l) - return 1 + return FAILURE if self._background: root_config.settings.unlock() @@ -1180,7 +1184,7 @@ class Scheduler(PollScheduler): printer.eerror("") if self._failed_pkgs_all: - return 1 + return FAILURE return os.EX_OK def _elog_listener(self, mysettings, key, logentries, fulltext):