From 68ee539e407950abdc1aae75af900355c7b78931 Mon Sep 17 00:00:00 2001 From: Rosario Di Somma Date: Fri, 25 Oct 2013 18:37:44 +0000 Subject: [PATCH] Switch to flake8 Change-Id: I29ad27eca617e9ca801024d598d665cf1a2728d0 Signed-off-by: Rosario Di Somma --- .travis.yml | 4 ++-- akanda/neutron/plugins/nvp_neutron_plugin.py | 4 +--- setup.py | 2 -- tox.ini | 17 ++++++++--------- 4 files changed, 11 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5b2e689..321de02 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,8 +3,8 @@ python: - "2.7" install: - pip install -r test_requirements.txt --use-mirror - - pip install pep8 --use-mirrors + - pip install flake8 --use-mirrors - pip install -q . --use-mirrors before_script: - - pep8 --repeat --show-source --ignore=E125 --statistics --exclude=dist,doc,*egg . + - flake8 --show-source --ignore=E125 --statistics akanda test setup.py script: nosetests -d \ No newline at end of file diff --git a/akanda/neutron/plugins/nvp_neutron_plugin.py b/akanda/neutron/plugins/nvp_neutron_plugin.py index c69e57f..d370480 100644 --- a/akanda/neutron/plugins/nvp_neutron_plugin.py +++ b/akanda/neutron/plugins/nvp_neutron_plugin.py @@ -21,8 +21,6 @@ import functools from neutron.common import topics from neutron.db import l3_db from neutron.db import l3_rpc_base as l3_rpc -from neutron.extensions import portsecurity as psec -from neutron.extensions import securitygroup as ext_sg from neutron.openstack.common import log as logging from neutron.openstack.common import rpc from neutron.plugins.nicira.dhcp_meta import rpc as nvp_rpc @@ -201,7 +199,7 @@ class NvpPluginV2(nvp.NvpPluginV2): {'port_id': port_data['id'], 'net_id': port_data['network_id']}) - except q_exc.NotFound: + except nvp.q_exc.NotFound: LOG.warning(_("Port %s not found in NVP"), port_data['id']) diff --git a/setup.py b/setup.py index 4c68913..3256ae0 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,3 @@ -import os - from setuptools import setup, find_packages diff --git a/tox.ini b/tox.ini index 3d5f8c1..db6e1fc 100644 --- a/tox.ini +++ b/tox.ini @@ -6,11 +6,9 @@ deps = -r{toxinidir}/test_requirements.txt commands = nosetests {posargs} sitepackages = False -[tox:jenkins] - -[testenv:pep8] -deps = pep8 -commands = pep8 --repeat --show-source --ignore=E125 --exclude=.venv,.tox,dist,doc,*egg . +[testenv:style] +deps = flake8 +commands = flake8 akanda test setup.py [testenv:cover] setenv = NOSE_WITH_COVERAGE=1 @@ -18,7 +16,8 @@ setenv = NOSE_WITH_COVERAGE=1 [testenv:venv] commands = {posargs} -[testenv:pyflakes] -deps = pyflakes -commands = pyflakes akanda - +[flake8] +ignore = E125 +show-source = true +statistics = true +builtins = _ \ No newline at end of file