if options.ask and userquery('Commit changes?', True) != 'Yes':
print("* aborting commit.")
- sys.exit(1)
+ sys.exit(128 + signal.SIGINT)
# Handle the case where committed files have keywords which
# will change and need a priming commit before the Manifest
print()
print("Quitting.")
print()
- return 1
+ return 128 + signal.SIGINT
# Don't ask again (e.g. when auto-cleaning packages after merge)
myopts.pop("--ask", None)
options.append("X")
idx = userquery("Selection?", enter_invalid, responses=options)
if idx == "X":
- sys.exit(0)
+ sys.exit(128 + signal.SIGINT)
pkg = pkgs[int(idx)-1]
else:
print("The following packages available:")
print()
if "--ask" in myopts:
if userquery("Ready to configure %s?" % pkg, enter_invalid) == "No":
- sys.exit(0)
+ sys.exit(128 + signal.SIGINT)
else:
print("Configuring pkg...")
print()
prompt = "Would you like to remove these " + \
"packages from your world favorites?"
if userquery(prompt, enter_invalid) == 'No':
- return os.EX_OK
+ return 128 + signal.SIGINT
remaining = set(world_set)
remaining.difference_update(discard_atoms)
print()
print("Quitting.")
print()
- sys.exit(0)
+ sys.exit(128 + signal.SIGINT)
emergelog(xterm_titles, ">>> Starting rsync with " + dosyncuri)
if "--quiet" not in myopts:
print(">>> Starting rsync with "+dosyncuri+"...")
portage_group_warning()
if userquery("Would you like to add --pretend to options?",
"--ask-enter-invalid" in myopts) == "No":
- return 1
+ return 128 + signal.SIGINT
myopts["--pretend"] = True
del myopts["--ask"]
else:
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
from __future__ import print_function
+import signal
import sys
from portage.output import bold, create_color_func
print("Sorry, response '%s' not understood." % response, end=' ')
except (EOFError, KeyboardInterrupt):
print("Interrupted.")
- sys.exit(1)
-
+ sys.exit(128 + signal.SIGINT)