* 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]>
---
 utils/build_externals.py |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

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 @@ Usage?  Just run it.
     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 @@ def main():
 
     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 @@ def fetch_necessary_packages(dest_dir, install_dir):
             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 @@ def build_and_install_packages(packages, install_dir):
     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
 
-- 
1.6.6.1

_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to