]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Use built-in print() instead of print statement
authorChang Bo Guo <guochbo@cn.ibm.com>
Wed, 18 Sep 2013 07:00:17 +0000 (00:00 -0700)
committerChang Bo Guo <guochbo@cn.ibm.com>
Wed, 18 Sep 2013 15:44:28 +0000 (08:44 -0700)
In python 3 print statement is not supported, so we should use
only print() functions.

Fixes bug 1226943

Change-Id: I7b2e4d52fe9050f6a67c44e4cc1237a15ea90b23

bin/cinder-manage
doc/ext/cinder_autodoc.py

index 3c05d779fadfda92555e64e051c0eed9a9bc6b44..76afaf6b589e30038ef0e51d50de7b2abafae60f 100755 (executable)
@@ -512,7 +512,7 @@ def main():
         print(_("\nOpenStack Cinder version: %(version)s\n") %
               {'version': version.version_string()})
         print(script_name + " category action [<args>]")
-        print (_("Available categories:"))
+        print(_("Available categories:"))
         for category in CATEGORIES:
             print("\t%s" % category)
         sys.exit(2)
index a778f4a522cef1742f6dafa1ff19176ab2d8fed1..a6b7d6853946f528665088f28cf4696fb2015758 100644 (file)
@@ -1,3 +1,5 @@
+from __future__ import print_function
+
 import gettext
 import os
 
@@ -7,6 +9,6 @@ from cinder import utils
 
 
 def setup(app):
-    print "**Autodocumenting from %s" % os.path.abspath(os.curdir)
+    print("**Autodocumenting from %s" % os.path.abspath(os.curdir))
     rv = utils.execute('./doc/generate_autodoc_index.sh')
-    print rv[0]
+    print(rv[0])