]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Avoid unnecessary explicit str() conversion around exceptions
authorAnn Kamyshnikova <akamyshnikova@mirantis.com>
Wed, 3 Dec 2014 12:57:58 +0000 (15:57 +0300)
committerAnn Kamyshnikova <akamyshnikova@mirantis.com>
Tue, 16 Dec 2014 08:19:09 +0000 (11:19 +0300)
commit3a7c3f77b0a311447c8db8d4d7c50326f40b2515
treef6ece6fdbd00de27c1f506713a7127ce400f8a82
parentbcb5675d92e61ed4b9d424d8687743d907a74fb1
Avoid unnecessary explicit str() conversion around exceptions

There are number of places like

except Exception as exc:
            LOG.error("Failed to get network: %s", str(exc))

where str() is not needed since %s substitution already does
the same conversion. Also LOG.error could be replaced with
LOG.exception, so argument exc won't be needed at all.

Closes-bug: #1398839

Change-Id: I73cc6e1ce55ade08e7706b99a5ab075f7059a4ef
neutron/agent/l3/agent.py
neutron/db/migration/cli.py
neutron/plugins/bigswitch/servermanager.py
neutron/plugins/cisco/l3/hosting_device_drivers/csr1kv_hd_driver.py
neutron/plugins/nec/packet_filter.py
neutron/plugins/nuage/syncmanager.py
neutron/plugins/sriovnicagent/pci_lib.py
neutron/plugins/vmware/check_nsx_config.py
neutron/plugins/vmware/nsxlib/router.py
neutron/plugins/vmware/nsxlib/switch.py
neutron/tests/unit/database_stubs.py