aboutsummaryrefslogtreecommitdiffstats
path: root/opnfv/utils/ovs_logger.py
diff options
context:
space:
mode:
authorjose.lausuch <jose.lausuch@ericsson.com>2017-02-14 14:37:05 +0100
committerjose.lausuch <jose.lausuch@ericsson.com>2017-02-14 16:58:05 +0100
commitf169fa760059f91ba68960a7f87ca915e7d0ddaf (patch)
tree6178525e8a96f13613846603489e042f05009947 /opnfv/utils/ovs_logger.py
parent2b191ef958106da17594ee8a4143a392984822b0 (diff)
Fix flake8 violations in releng
Change-Id: I45769ff9c9db2de9fbba69117a92de414dd7f651 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
Diffstat (limited to 'opnfv/utils/ovs_logger.py')
-rw-r--r--opnfv/utils/ovs_logger.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/opnfv/utils/ovs_logger.py b/opnfv/utils/ovs_logger.py
index 3159609..75b4cec 100644
--- a/opnfv/utils/ovs_logger.py
+++ b/opnfv/utils/ovs_logger.py
@@ -16,6 +16,7 @@ logger = OPNFVLogger.Logger('ovs_logger').getLogger()
class OVSLogger(object):
+
def __init__(self, basedir, ft_resdir):
self.ovs_dir = basedir
self.ft_resdir = ft_resdir
@@ -32,7 +33,7 @@ class OVSLogger(object):
hosts = stdout.readline().strip().split(' ')
found_host = [h for h in hosts if h.startswith(host_prefix)][0]
return found_host
- except Exception, e:
+ except Exception as e:
logger.error(e)
def __dump_to_file(self, operation, host, text, timestamp=None):
@@ -55,7 +56,7 @@ class OVSLogger(object):
.format(cmd, host))
output = ''.join(stdout.readlines())
return output
- except Exception, e:
+ except Exception as e:
logger.error('[__remote_command(ssh_client, {0})]: {1}'
.format(cmd, e))
return None
@@ -78,7 +79,7 @@ class OVSLogger(object):
host = self.__ssh_host(ssh_conn)
self.__dump_to_file(operation, host, output, timestamp=timestamp)
return output
- except Exception, e:
+ except Exception as e:
logger.error('[ofctl_dump_flows(ssh_client, {0}, {1})]: {2}'
.format(br, choose_table, e))
return None
@@ -91,7 +92,7 @@ class OVSLogger(object):
host = self.__ssh_host(ssh_conn)
self.__dump_to_file(operation, host, output, timestamp=timestamp)
return output
- except Exception, e:
+ except Exception as e:
logger.error('[vsctl_show(ssh_client)]: {0}'.format(e))
return None