summaryrefslogtreecommitdiffstats
path: root/inventory/libvirt
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2017-01-10 16:27:29 -0500
committerGitHub <noreply@github.com>2017-01-10 16:27:29 -0500
commit393eccd3a5347a13eda5d627f3cc35aeeb42f1cc (patch)
tree668806139fc108ce6763cc95a640aedffa8a4ecf /inventory/libvirt
parent706c582b2482d5cc3a4fb28b348ce5b856fc9c26 (diff)
parent33da32dbcdc5e93e26bccf59d0781a60386b6b04 (diff)
downloadopenshift-393eccd3a5347a13eda5d627f3cc35aeeb42f1cc.tar.gz
openshift-393eccd3a5347a13eda5d627f3cc35aeeb42f1cc.tar.bz2
openshift-393eccd3a5347a13eda5d627f3cc35aeeb42f1cc.tar.xz
openshift-393eccd3a5347a13eda5d627f3cc35aeeb42f1cc.zip
Merge pull request #3007 from detiber/toxification
More Toxification
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: