Python 3.x incompatible use of print operator
Start working on low hanging fruit for python3 support. Change-Id: I6d52c3a4ad4d383437925ecae6002de7528c9be0 Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
parent
6495f861f5
commit
5d423bee9a
@ -145,13 +145,13 @@ class NodePoolCmd(NodepoolApp):
|
|||||||
l.setLevel(logging.WARNING)
|
l.setLevel(logging.WARNING)
|
||||||
|
|
||||||
def list(self, node_id=None):
|
def list(self, node_id=None):
|
||||||
print status.node_list(self.zk, node_id)
|
print(status.node_list(self.zk, node_id))
|
||||||
|
|
||||||
def dib_image_list(self):
|
def dib_image_list(self):
|
||||||
print status.dib_image_list(self.zk)
|
print(status.dib_image_list(self.zk))
|
||||||
|
|
||||||
def image_list(self):
|
def image_list(self):
|
||||||
print status.image_list(self.zk)
|
print(status.image_list(self.zk))
|
||||||
|
|
||||||
def image_build(self, diskimage=None):
|
def image_build(self, diskimage=None):
|
||||||
diskimage = diskimage or self.args.image
|
diskimage = diskimage or self.args.image
|
||||||
@ -189,7 +189,7 @@ class NodePoolCmd(NodepoolApp):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
log.warning("Exception listing aliens for %s: %s"
|
log.warning("Exception listing aliens for %s: %s"
|
||||||
% (provider.name, str(e.message)))
|
% (provider.name, str(e.message)))
|
||||||
print t
|
print(t)
|
||||||
|
|
||||||
def alien_image_list(self):
|
def alien_image_list(self):
|
||||||
self.pool.updateConfig()
|
self.pool.updateConfig()
|
||||||
@ -237,7 +237,7 @@ class NodePoolCmd(NodepoolApp):
|
|||||||
if image['id'] in alien_ids:
|
if image['id'] in alien_ids:
|
||||||
t.add_row([provider.name, image['name'], image['id']])
|
t.add_row([provider.name, image['name'], image['id']])
|
||||||
|
|
||||||
print t
|
print(t)
|
||||||
|
|
||||||
def hold(self):
|
def hold(self):
|
||||||
node = self.zk.getNode(self.args.id)
|
node = self.zk.getNode(self.args.id)
|
||||||
@ -315,7 +315,7 @@ class NodePoolCmd(NodepoolApp):
|
|||||||
#TODO(asselin,yolanda): add validation of secure.conf
|
#TODO(asselin,yolanda): add validation of secure.conf
|
||||||
|
|
||||||
def request_list(self):
|
def request_list(self):
|
||||||
print status.request_list(self.zk)
|
print(status.request_list(self.zk))
|
||||||
|
|
||||||
def _wait_for_threads(self, threads):
|
def _wait_for_threads(self, threads):
|
||||||
for t in threads:
|
for t in threads:
|
||||||
|
@ -262,6 +262,6 @@ class FakeFile(StringIO.StringIO):
|
|||||||
self.__path = path
|
self.__path = path
|
||||||
|
|
||||||
def close(self):
|
def close(self):
|
||||||
print "Wrote to %s:" % self.__path
|
print("Wrote to %s:" % self.__path)
|
||||||
print self.getvalue()
|
print(self.getvalue())
|
||||||
StringIO.StringIO.close(self)
|
StringIO.StringIO.close(self)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user