From 994c69ac9e6a6758bc4e18ea6204ae29cbd05080 Mon Sep 17 00:00:00 2001 From: Arata Notsu Date: Tue, 2 Apr 2013 10:45:45 +0900 Subject: Remove print statements Change-Id: I40a805bee3f10d5989188971423cbb6c07f740c8 --- nova/api/openstack/compute/contrib/baremetal_nodes.py | 1 - nova/network/minidns.py | 2 +- nova/utils.py | 3 ++- nova/virt/hyperv/vmops.py | 1 - 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/nova/api/openstack/compute/contrib/baremetal_nodes.py b/nova/api/openstack/compute/contrib/baremetal_nodes.py index 70bb6e8a0..e0d8e7d06 100644 --- a/nova/api/openstack/compute/contrib/baremetal_nodes.py +++ b/nova/api/openstack/compute/contrib/baremetal_nodes.py @@ -176,7 +176,6 @@ class BareMetalNodeController(wsgi.Controller): authorize(context) self._check_node_exists(context, id) body = body['remove_interface'] - print "body(%s)" % body if_id = body.get('id') address = body.get('address') if not if_id and not address: diff --git a/nova/network/minidns.py b/nova/network/minidns.py index b4b5257ea..dea2f815b 100644 --- a/nova/network/minidns.py +++ b/nova/network/minidns.py @@ -198,7 +198,7 @@ class MiniDNS(dns_driver.DNSDriver): entry['domain'] != fqdomain.lower()): outfile.write(line) else: - print "deleted %s" % entry + LOG.info(_("deleted %s"), entry) deleted = True infile.close() outfile.close() diff --git a/nova/utils.py b/nova/utils.py index dbbbd1eb6..7a586c322 100644 --- a/nova/utils.py +++ b/nova/utils.py @@ -142,7 +142,8 @@ def vpn_ping(address, port, timeout=0.05, session_id=None): sock.close() fmt = '!BQxxxxxQxxxx' if len(received) != struct.calcsize(fmt): - print struct.calcsize(fmt) + LOG.warn(_('Expected to receive %(exp)s bytes, but actually %(act)s') % + dict(exp=struct.calcsize(fmt), act=len(received))) return False (identifier, server_sess, client_sess) = struct.unpack(fmt, received) if identifier == 0x40 and client_sess == session_id: diff --git a/nova/virt/hyperv/vmops.py b/nova/virt/hyperv/vmops.py index 3b71514d3..efdcf4120 100644 --- a/nova/virt/hyperv/vmops.py +++ b/nova/virt/hyperv/vmops.py @@ -313,7 +313,6 @@ class VMOps(object): def suspend(self, instance): """Suspend the specified instance.""" - print instance LOG.debug(_("Suspend instance"), instance=instance) self._set_vm_state(instance["name"], constants.HYPERV_VM_STATE_SUSPENDED) -- cgit