diff options
author | Manuel Buil <mbuil@suse.com> | 2018-08-29 13:40:49 +0200 |
---|---|---|
committer | Brady Johnson <bjohnson@inocybe.com> | 2018-08-29 15:45:06 +0000 |
commit | 4d26d88cd9baeaf35084ab59528223692ad6df25 (patch) | |
tree | d088495cf32a5338bd10d7e30a51939c661fa8ab | |
parent | 938968c4284d863f000b3da4d091d702e97a8360 (diff) |
Flake8 fixes
When running flake8 I am getting several errors. This patch fixes them
Change-Id: I4d32b4b214ca61e98da6fc28a4de44201c4c1cdc
Signed-off-by: Manuel Buil <mbuil@suse.com>
-rw-r--r-- | sfc/lib/odl_utils.py | 2 | ||||
-rw-r--r-- | sfc/tests/NAME_tests.py | 11 | ||||
-rw-r--r-- | sfc/tests/functest/setup_scripts/prepare_odl_sfc.py | 4 |
3 files changed, 3 insertions, 14 deletions
diff --git a/sfc/lib/odl_utils.py b/sfc/lib/odl_utils.py index a60fb557..ebc6a873 100644 --- a/sfc/lib/odl_utils.py +++ b/sfc/lib/odl_utils.py @@ -64,7 +64,7 @@ def get_active_rsps_on_ports(odl_ip, odl_port, neutron_ports): # We get the first ace. ODL creates a new ACL # with one ace for each classifier ace = acl['access-list-entries']['ace'][0] - except: + except Exception: logger.warn('ACL {0} does not have an ACE'.format( acl['acl-name'])) continue diff --git a/sfc/tests/NAME_tests.py b/sfc/tests/NAME_tests.py deleted file mode 100644 index e95004bc..00000000 --- a/sfc/tests/NAME_tests.py +++ /dev/null @@ -1,11 +0,0 @@ - -def setup(): - print "SETUP!" - - -def teardown(): - print "TEAR DOWN!" - - -def test_basic(): - print "I RAN!" diff --git a/sfc/tests/functest/setup_scripts/prepare_odl_sfc.py b/sfc/tests/functest/setup_scripts/prepare_odl_sfc.py index 1ddf36a6..dc806232 100644 --- a/sfc/tests/functest/setup_scripts/prepare_odl_sfc.py +++ b/sfc/tests/functest/setup_scripts/prepare_odl_sfc.py @@ -24,7 +24,7 @@ SFC_REPO_DIR = "/home/opnfv/repos/sfc" try: INSTALLER_IP = os.environ['INSTALLER_IP'] -except: +except Exception: logger.debug("INSTALLER_IP does not exist. We create 10.20.0.2") INSTALLER_IP = "10.20.0.2" @@ -64,7 +64,7 @@ try: command = "fuel node | grep compute | awk '{print $10}'" logger.info("Executing ssh to collect the compute IPs") (stdin, stdout, stderr) = ssh.exec_command(command) -except: +except Exception: logger.debug("Something went wrong in the ssh to collect the computes IP") output = stdout.readlines() |