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:
Paul Belanger 2017-05-09 11:00:22 -04:00
parent 6495f861f5
commit 5d423bee9a
No known key found for this signature in database
GPG Key ID: 611A80832067AF38
3 changed files with 9 additions and 9 deletions

View File

@ -145,13 +145,13 @@ class NodePoolCmd(NodepoolApp):
l.setLevel(logging.WARNING)
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):
print status.dib_image_list(self.zk)
print(status.dib_image_list(self.zk))
def image_list(self):
print status.image_list(self.zk)
print(status.image_list(self.zk))
def image_build(self, diskimage=None):
diskimage = diskimage or self.args.image
@ -189,7 +189,7 @@ class NodePoolCmd(NodepoolApp):
except Exception as e:
log.warning("Exception listing aliens for %s: %s"
% (provider.name, str(e.message)))
print t
print(t)
def alien_image_list(self):
self.pool.updateConfig()
@ -237,7 +237,7 @@ class NodePoolCmd(NodepoolApp):
if image['id'] in alien_ids:
t.add_row([provider.name, image['name'], image['id']])
print t
print(t)
def hold(self):
node = self.zk.getNode(self.args.id)
@ -315,7 +315,7 @@ class NodePoolCmd(NodepoolApp):
#TODO(asselin,yolanda): add validation of secure.conf
def request_list(self):
print status.request_list(self.zk)
print(status.request_list(self.zk))
def _wait_for_threads(self, threads):
for t in threads:

View File

@ -262,6 +262,6 @@ class FakeFile(StringIO.StringIO):
self.__path = path
def close(self):
print "Wrote to %s:" % self.__path
print self.getvalue()
print("Wrote to %s:" % self.__path)
print(self.getvalue())
StringIO.StringIO.close(self)

View File

@ -40,6 +40,6 @@ commands = {posargs}
[flake8]
ignore = E123,E125,H
select = H231,F
select = H231,H233,F
show-source = True
exclude = .venv,.tox,dist,doc,build,*.egg