utils/build_externals.py fixes
* Getting rid of unused sha import that causes deprecation messages.
* Replaced print with appropriate logging calls.
Risk: Low (Small, tested change for consistency sake).
Signed-off-by: Lucas Meneghel Rodrigues <[email protected]>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@4380 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/utils/build_externals.py b/utils/build_externals.py
index 268eadf..b404b6e 100755
--- a/utils/build_externals.py
+++ b/utils/build_externals.py
@@ -12,7 +12,7 @@
utils/build_externals.py
"""
-import compileall, logging, os, sha, shutil, sys, tempfile, time, urllib2
+import compileall, logging, os, shutil, sys, tempfile, time, urllib2
import subprocess, re
import common
from autotest_lib.client.common_lib import logging_config, logging_manager
@@ -84,7 +84,7 @@
errors = fetch_errors + install_errors
for error_msg in errors:
- print >>sys.stderr, error_msg
+ logging.error(error_msg)
return len(errors)
@@ -116,8 +116,8 @@
else:
continue
if not package.fetch(dest_dir):
- msg = '!!! Unable to download %s' % package.name
- print msg
+ msg = 'Unable to download %s' % package.name
+ logging.error(msg)
errors.append(msg)
else:
fetched_packages.append(package)
@@ -137,8 +137,8 @@
errors = []
for package in packages:
if not package.build_and_install(install_dir):
- msg = '!!! Unable to build and install %s' % package.name
- print msg
+ msg = 'Unable to build and install %s' % package.name
+ logging.error(msg)
errors.append(msg)
return errors