scripts/release/release.py
changeset 1824 c54c304e3c0e
parent 1823 f55d0e1d3f82
child 1825 a610a2df83d2
--- a/scripts/release/release.py	Fri Mar 13 01:49:39 2009 +0000
+++ b/scripts/release/release.py	Fri Mar 13 01:59:54 2009 +0000
@@ -48,6 +48,7 @@
 import sys
 
 import error
+import util
 
 
 # Default repository URLs for Melange and the Google release
@@ -112,7 +113,7 @@
       SubprocessFailed: The subprocess exited with a non-zero exit
                         code.
     """
-    print '\x1b[1m# %s\x1b[22m' % ' '.join(argv)
+    print util.colorize('# ' + ' '.join(argv), util.WHITE, bold=True)
 
     process = subprocess.Popen(argv,
                                shell=False,
@@ -131,13 +132,13 @@
 
 
 def error(msg):
-    """Print an error message, with appropriate formatting."""
-    print '\x1b[1m\x1b[31m%s\x1b[0m' % msg
+    """Log an error message."""
+    print util.colorize(msg, util.RED, bold=True)
 
 
 def info(msg):
-    """Print an informational message, with appropriate formatting."""
-    print '\x1b[32m%s\x1b[0m' % msg
+    """Log an informational message."""
+    print util.colorize(msg, util.GREEN)
 
 
 def confirm(prompt, default=False):