From: "Brian Dolbec" <brian.dolbec@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/layman:master commit in: layman/
Date: Mon, 14 Feb 2011 06:00:34 +0000 (UTC) [thread overview]
Message-ID: <cc15f2551e105540850101572ccba275a6fc1ace.dol-sen@gentoo> (raw)
Message-ID: <20110214060034.AXlLY_iK6UZ3iErNGmUoJoNSGR66wQg6v9juFnXva5Y@z> (raw)
commit: cc15f2551e105540850101572ccba275a6fc1ace
Author: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
AuthorDate: Mon Feb 14 00:53:33 2011 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Mon Feb 14 00:53:33 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=cc15f255
fix the incorrect exit code settings which are opposite the True/False that the api returns
---
layman/cli.py | 7 ++++---
layman/constants.py | 3 +++
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/layman/cli.py b/layman/cli.py
index 3277c1b..8f94f4a 100644
--- a/layman/cli.py
+++ b/layman/cli.py
@@ -27,7 +27,8 @@ import os, sys
from layman.api import LaymanAPI
from layman.utils import (decode_selection, encoder, get_encoding,
pad, terminal_width)
-from layman.constants import NOT_OFFICIAL_MSG, NOT_SUPPORTED_MSG
+from layman.constants import (NOT_OFFICIAL_MSG, NOT_SUPPORTED_MSG,
+ FAILURE, SUCCEED)
@@ -180,9 +181,9 @@ class Main(object):
os.umask(old_umask)
if not result:
- sys.exit(0)
+ sys.exit(FAILURE)
else:
- sys.exit(1)
+ sys.exit(SUCCEED)
def Fetch(self):
diff --git a/layman/constants.py b/layman/constants.py
index 6962867..6f53de3 100644
--- a/layman/constants.py
+++ b/layman/constants.py
@@ -50,3 +50,6 @@ WARN_LEVEL = 4
INFO_LEVEL = 4
DEBUG_LEVEL = 4
DEBUG_VERBOSITY = 2
+
+FAILURE = 1
+SUCCEED = 0
next reply other threads:[~2011-02-14 6:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-14 0:54 Brian Dolbec [this message]
2011-02-14 6:00 ` [gentoo-commits] proj/layman:master commit in: layman/ Brian Dolbec
-- strict thread matches above, loose matches on Subject: below --
2011-02-14 6:00 Brian Dolbec
2011-02-14 0:54 ` [gentoo-commits] proj/layman:overlord_merge " Brian Dolbec
2011-02-14 6:00 [gentoo-commits] proj/layman:master " Brian Dolbec
2011-02-14 0:54 ` [gentoo-commits] proj/layman:overlord_merge " Brian Dolbec
2011-02-14 0:54 Brian Dolbec
2011-02-14 0:54 Brian Dolbec
2011-02-14 0:54 Brian Dolbec
2011-02-14 0:54 Brian Dolbec
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cc15f2551e105540850101572ccba275a6fc1ace.dol-sen@gentoo \
--to=brian.dolbec@gmail.com \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox