Package portage :: Package package :: Package ebuild :: Package _ipc :: Module ExitCommand
[hide private]

Source Code for Module portage.package.ebuild._ipc.ExitCommand

 1  # Copyright 2010 Gentoo Foundation 
 2  # Distributed under the terms of the GNU General Public License v2 
 3   
 4  from portage.package.ebuild._ipc.IpcCommand import IpcCommand 
 5   
6 -class ExitCommand(IpcCommand):
7 8 __slots__ = ('exitcode', 'reply_hook',) 9
10 - def __init__(self):
11 IpcCommand.__init__(self) 12 self.reply_hook = None 13 self.exitcode = None
14
15 - def __call__(self, argv):
16 17 if self.exitcode is not None: 18 # Ignore all but the first call, since if die is called 19 # then we certainly want to honor that exitcode, even 20 # the ebuild process manages to send a second exit 21 # command. 22 self.reply_hook = None 23 else: 24 self.exitcode = int(argv[1]) 25 26 # (stdout, stderr, returncode) 27 return ('', '', 0)
28