From 07fd520d161b8612e8e3e33155cc633c73ee7088 Mon Sep 17 00:00:00 2001 From: Chuck Short Date: Wed, 26 Jun 2013 14:35:49 -0400 Subject: [PATCH] python3: Fix print statements Fix print statements while running with python3. This is due to the fact that the print() has changed between python2 and python3. Change-Id: I3af57cf8925e0fcfb34981f5b72ed989ba9f6cd4 Signed-off-by: Chuck Short --- novaclient/v1_1/shell.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/novaclient/v1_1/shell.py b/novaclient/v1_1/shell.py index 0156cbb55..5d882a646 100644 --- a/novaclient/v1_1/shell.py +++ b/novaclient/v1_1/shell.py @@ -16,6 +16,8 @@ # License for the specific language governing permissions and limitations # under the License. +from __future__ import print_function + import argparse import copy import datetime @@ -896,7 +898,7 @@ def do_image_delete(cs, args): try: _find_image(cs, image).delete() except Exception as e: - print "Delete for image %s failed: %s" % (image, e) + print("Delete for image %s failed: %s" % (image, e)) @utils.arg('--reservation-id', @@ -2178,7 +2180,7 @@ def _print_keypair(keypair): kp = keypair._info.copy() pk = kp.pop('public_key') utils.print_dict(kp) - print "Public key: %s" % pk + print("Public key: %s" % pk) @utils.arg('keypair',