diff options
author | Pearu Peterson <pearu.peterson@gmail.com> | 2004-02-13 18:11:56 +0000 |
---|---|---|
committer | Pearu Peterson <pearu.peterson@gmail.com> | 2004-02-13 18:11:56 +0000 |
commit | 3317087bc3f28aaebc5e796346e306cbb1828b43 (patch) | |
tree | 60e76dc94596caac5abfa74a6a360e3e6c7d8067 /scipy_distutils/exec_command.py | |
parent | c74322b996d922f02bcc51d52a0d23083da3f072 (diff) | |
download | numpy-3317087bc3f28aaebc5e796346e306cbb1828b43.tar.gz |
Reduced scipy_distutils verbosity
Diffstat (limited to 'scipy_distutils/exec_command.py')
-rw-r--r-- | scipy_distutils/exec_command.py | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/scipy_distutils/exec_command.py b/scipy_distutils/exec_command.py index d8481ef94..b2fd0e05c 100644 --- a/scipy_distutils/exec_command.py +++ b/scipy_distutils/exec_command.py @@ -47,18 +47,7 @@ import tempfile ############################################################ -try: - import logging - log = logging.getLogger('exec_command') -except ImportError: - class logging: - DEBUG = 0 - def info(self,message): print 'info:',message - def warn(self,message): print 'warn:',message - def debug(self,message): print 'debug:',message - def basicConfig(self): pass - def setLevel(self,level): pass - log = logging = logging() +from log import _global_log as log ############################################################ @@ -190,8 +179,8 @@ def exec_command( command, On NT, DOS systems the returned status is correct for external commands. Wild cards will not work for non-posix systems or when use_shell=0. """ - log.info('exec_command(%r,%s)' % (command,\ - ','.join(['%s=%r'%kv for kv in env.items()]))) + log.debug('exec_command(%r,%s)' % (command,\ + ','.join(['%s=%r'%kv for kv in env.items()]))) if use_tee is None: use_tee = os.name=='posix' @@ -543,8 +532,8 @@ def test_execute_in(**kws): f.write('Hello') f.close() - s,o = exec_command('%s -c "print \'Ignore following IOError:\',open(%r,\'r\')"' \ - % (pythonexe,fn),**kws) + s,o = exec_command('%s -c "print \'Ignore the following IOError:\','\ + 'open(%r,\'r\')"' % (pythonexe,fn),**kws) assert s and o!='',(s,o) s,o = exec_command('%s -c "print open(%r,\'r\').read()"' % (pythonexe,fn), execute_in = tmpdir,**kws) @@ -562,8 +551,6 @@ else: ############################################################ if __name__ == "__main__": - logging.basicConfig() - log.setLevel(logging.DEBUG) test_splitcmdline() test(use_tee=0) |