From ffdc009223d661ce591367efb8cbe1d1a46b616d Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Wed, 27 May 2009 08:58:12 -0700 Subject: [PATCH] Normalize spaces and tabs: modules/catalyst/spawn.py - def process_exit_code --- modules/catalyst/spawn.py | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/modules/catalyst/spawn.py b/modules/catalyst/spawn.py index 9ab2a230e..6d87b892 100644 --- a/modules/catalyst/spawn.py +++ b/modules/catalyst/spawn.py @@ -306,18 +306,17 @@ def cmd(mycmd,myexc="",env={}): raise def process_exit_code(retval,throw_signals=False): - """process a waitpid returned exit code, returning exit code if it exit'd, or the - signal if it died from signalling - if throw_signals is on, it raises a SystemExit if the process was signaled. - This is intended for usage with threads, although at the moment you can't signal individual - threads in python, only the master thread, so it's a questionable option.""" - if (retval & 0xff)==0: - return retval >> 8 # return exit code - else: - if throw_signals: - #use systemexit, since portage is stupid about exception catching. - raise SystemExit() - return (retval & 0xff) << 8 # interrupted by signal - + """process a waitpid returned exit code, returning exit code if it exit'd, or the + signal if it died from signalling + if throw_signals is on, it raises a SystemExit if the process was signaled. + This is intended for usage with threads, although at the moment you can't signal individual + threads in python, only the master thread, so it's a questionable option.""" + if (retval & 0xff)==0: + return retval >> 8 # return exit code + else: + if throw_signals: + #use systemexit, since portage is stupid about exception catching. + raise SystemExit() + return (retval & 0xff) << 8 # interrupted by signal # vim: ts=4 sw=4 sta noet sts=4 ai -- 2.26.2