X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=system%2Futils.py;h=d6938bf390dc826c4e666a2c7bf744d966257ea3;hb=86060c0d1d30f491bda3f34be1f4fa7a16230a7d;hp=19113b0f1ea24a0853e7612fd1d1d60c7c14adea;hpb=efda9075336780b08465c97892e57064ca922d15;p=tests.git diff --git a/system/utils.py b/system/utils.py index 19113b0..d6938bf 100644 --- a/system/utils.py +++ b/system/utils.py @@ -1,4 +1,6 @@ -# $Id$ +# Thierry Parmentelat +# Copyright (C) 2010 INRIA +# import time, os, re, glob, sys from pprint import PrettyPrinter @@ -25,7 +27,9 @@ def system(command,background=False,silent=False): print 'dry_run:',command return 0 - if silent : command += "2> /dev/null" + if silent : + if command.find(';')>=0: command = "(%s) 2> /dev/null" % command + else: command += " 2> /dev/null" if background: command += " &" if silent: print '.',