summaryrefslogtreecommitdiffstats
path: root/inventory/libvirt
diff options
context:
space:
mode:
authorJason DeTiberus <jdetiber@redhat.com>2016-12-21 17:15:42 -0500
committerJason DeTiberus <jdetiber@redhat.com>2017-01-10 11:45:30 -0500
commitbe949e0a0a2420205aaf80de514432a76596a854 (patch)
treebe5edc6198f976215c1521a490d788f46b29e227 /inventory/libvirt
parent9d316d3091b28820e3840c535fc9bc4b6603ed72 (diff)
downloadopenshift-be949e0a0a2420205aaf80de514432a76596a854.tar.gz
openshift-be949e0a0a2420205aaf80de514432a76596a854.tar.bz2
openshift-be949e0a0a2420205aaf80de514432a76596a854.tar.xz
openshift-be949e0a0a2420205aaf80de514432a76596a854.zip
More toxification
- Move pylint tests to tox - Move yamllint tests to tox - Create separate tox config (and setup.py) for root - bump ansible requirement - unify pylint config - add docs - remove git directory containing old testing tools - install python-six if not present for openshift-facts - add python-six as a dependency for openshift-ansible-utils
Diffstat (limited to 'inventory/libvirt')
-rwxr-xr-xinventory/libvirt/hosts/libvirt_generic.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/inventory/libvirt/hosts/libvirt_generic.py b/inventory/libvirt/hosts/libvirt_generic.py
index ac2f0430a..d63e07b64 100755
--- a/inventory/libvirt/hosts/libvirt_generic.py
+++ b/inventory/libvirt/hosts/libvirt_generic.py
@@ -61,11 +61,11 @@ class LibvirtInventory(object):
self.parse_cli_args()
if self.args.host:
- print _json_format_dict(self.get_host_info(), self.args.pretty)
+ print(_json_format_dict(self.get_host_info(), self.args.pretty))
elif self.args.list:
- print _json_format_dict(self.get_inventory(), self.args.pretty)
+ print(_json_format_dict(self.get_inventory(), self.args.pretty))
else: # default action with no options
- print _json_format_dict(self.get_inventory(), self.args.pretty)
+ print(_json_format_dict(self.get_inventory(), self.args.pretty))
def read_settings(self):
''' Reads the settings from the libvirt.ini file '''
@@ -115,12 +115,12 @@ class LibvirtInventory(object):
conn = libvirt.openReadOnly(self.libvirt_uri)
if conn is None:
- print "Failed to open connection to %s" % self.libvirt_uri
+ print("Failed to open connection to %s" % self.libvirt_uri)
sys.exit(1)
domains = conn.listAllDomains()
if domains is None:
- print "Failed to list domains for connection %s" % self.libvirt_uri
+ print("Failed to list domains for connection %s" % self.libvirt_uri)
sys.exit(1)
for domain in domains: