Replacing print with print() to provide py 2/3 compatibility

This patch replaces print operator in python 2 with print() to provide py 2/3
compatibility.

Change-Id: Ic8854e5518834e2894e003bab80d6be525ac0be8
This commit is contained in:
sonu.kumar 2015-08-03 17:35:01 +05:30
parent 24faeb8d03
commit e9e5b4287f
2 changed files with 4 additions and 2 deletions

View File

@ -1,4 +1,5 @@
# step-1
from __future__ import print_function
from libcloud.storage.types import Provider
from libcloud.storage.providers import get_driver
@ -36,7 +37,7 @@ print(objects)
# step-6
object = swift.get_object(container_name, object_name)
print object
print(object)
# step-7
import hashlib

View File

@ -1,5 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import os, sys
from xml2po import Main
@ -59,7 +60,7 @@ def generateSinglePoT(folder):
xml2po_main = Main(default_mode, operation, output, options)
xml2po_main.current_mode = myDocbookXmlMode()
except IOError:
print "Error: cannot open aFile %s for writing." % (output)
print("Error: cannot open aFile %s for writing." % (output))
sys.exit(5)
#print(xmlfiles)
#print(">>>outout: %s ", output)