[ovs-dev] [PATCH 38/55] ovs-monitor-ipsec: Minor style fixes.
Russell Bryant
russell at ovn.org
Mon Dec 21 20:47:38 UTC 2015
Remove an unused import and use "is None" instead of "== None".
Also add this script to the list of what's checked in the pep8 tox
environment.
Signed-off-by: Russell Bryant <russell at ovn.org>
---
debian/ovs-monitor-ipsec | 5 ++---
python/tox.ini | 2 +-
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/debian/ovs-monitor-ipsec b/debian/ovs-monitor-ipsec
index 1f1562d..b02b6ae 100755
--- a/debian/ovs-monitor-ipsec
+++ b/debian/ovs-monitor-ipsec
@@ -33,7 +33,6 @@ import sys
import ovs.dirs
from ovs.db import error
-from ovs.db import types
import ovs.util
import ovs.daemon
import ovs.db.idl
@@ -212,9 +211,9 @@ path certificate "%s";
if host in self.psk_hosts:
raise error.Error("host %s already defined for psk" % host)
- if vals["certificate"] == None:
+ if vals["certificate"] is None:
raise error.Error("'certificate' not defined for %s" % host)
- elif vals["private_key"] == None:
+ elif vals["private_key"] is None:
# Assume the private key is stored in the same PEM file as
# the certificate. We make a copy of "vals" so that we don't
# modify the original "vals", which would cause the script
diff --git a/python/tox.ini b/python/tox.ini
index 4e55e62..8f50a87 100644
--- a/python/tox.ini
+++ b/python/tox.ini
@@ -14,7 +14,7 @@ deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
[testenv:pep8]
-commands = flake8 --exclude="*testsuite.dir*" ovs/ ovstest/ {toxinidir}/../tests/
+commands = flake8 --exclude="*testsuite.dir*" ovs/ ovstest/ {toxinidir}/../tests/ {toxinidir}/../debian/ovs-monitor-ipsec
[flake8]
ignore=E111,E113,E126,E127,E128,E129,E131
--
2.5.0
More information about the dev
mailing list