diff options
Diffstat (limited to 'tools/regression/xsl_reports/utils/checked_system.py')
-rw-r--r-- | tools/regression/xsl_reports/utils/checked_system.py | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/tools/regression/xsl_reports/utils/checked_system.py b/tools/regression/xsl_reports/utils/checked_system.py deleted file mode 100644 index bdb8e8f8e..000000000 --- a/tools/regression/xsl_reports/utils/checked_system.py +++ /dev/null @@ -1,22 +0,0 @@ - -import os -import string -import sys - -def system( commands ): - if sys.platform == 'win32': - f = open( 'tmp.cmd', 'w' ) - f.write( string.join( commands, '\n' ) ) - f.close() - rc = os.system( 'tmp.cmd' ) - return rc - else: - rc = os.system( '&&'.join( commands ) ) - return rc - - -def checked_system( commands, valid_return_codes = [ 0 ] ): - rc = system( commands ) - if rc not in [ 0 ] + valid_return_codes: - raise Exception( 'Command sequence "%s" failed with return code %d' % ( commands, rc ) ) - return rc |