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:
parent
24faeb8d03
commit
e9e5b4287f
@ -1,4 +1,5 @@
|
|||||||
# step-1
|
# step-1
|
||||||
|
from __future__ import print_function
|
||||||
from libcloud.storage.types import Provider
|
from libcloud.storage.types import Provider
|
||||||
from libcloud.storage.providers import get_driver
|
from libcloud.storage.providers import get_driver
|
||||||
|
|
||||||
@ -36,7 +37,7 @@ print(objects)
|
|||||||
|
|
||||||
# step-6
|
# step-6
|
||||||
object = swift.get_object(container_name, object_name)
|
object = swift.get_object(container_name, object_name)
|
||||||
print object
|
print(object)
|
||||||
|
|
||||||
# step-7
|
# step-7
|
||||||
import hashlib
|
import hashlib
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
from __future__ import print_function
|
||||||
|
|
||||||
import os, sys
|
import os, sys
|
||||||
from xml2po import Main
|
from xml2po import Main
|
||||||
@ -59,7 +60,7 @@ def generateSinglePoT(folder):
|
|||||||
xml2po_main = Main(default_mode, operation, output, options)
|
xml2po_main = Main(default_mode, operation, output, options)
|
||||||
xml2po_main.current_mode = myDocbookXmlMode()
|
xml2po_main.current_mode = myDocbookXmlMode()
|
||||||
except IOError:
|
except IOError:
|
||||||
print "Error: cannot open aFile %s for writing." % (output)
|
print("Error: cannot open aFile %s for writing." % (output))
|
||||||
sys.exit(5)
|
sys.exit(5)
|
||||||
#print(xmlfiles)
|
#print(xmlfiles)
|
||||||
#print(">>>outout: %s ", output)
|
#print(">>>outout: %s ", output)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user