From: S.Çağlar Onur Date: Thu, 9 Dec 2010 03:26:07 +0000 (-0500) Subject: use sysexec_noerr for error handling X-Git-Tag: bootmanager-5.0-14~1 X-Git-Url: http://git.onelab.eu/?p=bootmanager.git;a=commitdiff_plain;h=88e017488d0d1875029b1d349cbe456d3ad3fe89 use sysexec_noerr for error handling --- diff --git a/source/BootManager.py b/source/BootManager.py index 9ed03ed..29497fe 100755 --- a/source/BootManager.py +++ b/source/BootManager.py @@ -149,7 +149,7 @@ class log: # NOTE: for code-reuse, evoke the bash function 'upload_logs'; # by adding --login, bash reads .bash_profile before execution. # Also, never fail, since this is an optional feature. - utils.sysexec( """bash --login -c "upload_logs %s || /bin/true" """ % extra_file, self) + utils.sysexec_noerr( """bash --login -c "upload_logs %s" """ % extra_file, self) ############################## @@ -369,7 +369,7 @@ def main(argv): LOG= log( BM_NODE_LOG ) # NOTE: assume CWD is BM's source directory, but never fail - utils.sysexec("./setup_bash_history_scripts.sh || /bin/true", LOG) + utils.sysexec_noerr("./setup_bash_history_scripts.sh", LOG) LOG.LogEntry( "BootManager started at: %s" % \ time.strftime("%a, %d %b %Y %H:%M:%S +0000", time.gmtime()) )