diff mbox

[ovs-dev,08/55] python: Restrict line length to 79 chars.

Message ID 1450730875-18083-9-git-send-email-russell@ovn.org
State Deferred
Headers show

Commit Message

Russell Bryant Dec. 21, 2015, 8:47 p.m. UTC
Resolve pep8 error:

  E501 line too long (80 > 79 characters)

Signed-off-by: Russell Bryant <russell@ovn.org>
---
 python/ovs/db/idl.py      |  6 ++++--
 python/ovs/dirs.py        | 10 +++++-----
 python/ovs/socket_util.py | 12 ++++++++----
 python/tox.ini            |  2 +-
 4 files changed, 18 insertions(+), 12 deletions(-)
diff mbox

Patch

diff --git a/python/ovs/db/idl.py b/python/ovs/db/idl.py
index 33ae9fe..3e4ca41 100644
--- a/python/ovs/db/idl.py
+++ b/python/ovs/db/idl.py
@@ -592,7 +592,8 @@  class Row(object):
 
         if ((self._table.name in self._idl.readonly) and
             (column_name in self._idl.readonly[self._table.name])):
-            vlog.warn("attempting to write to readonly column %s" % column_name)
+            vlog.warn("attempting to write to readonly column %s"
+                      % column_name)
             return
 
         column = self._table.columns[column_name]
@@ -1108,7 +1109,8 @@  class Transaction(object):
         # transaction only does writes of existing values, without making any
         # real changes, we will drop the whole transaction later in
         # ovsdb_idl_txn_commit().)
-        if not column.alert and row._data and row._data.get(column.name) == datum:
+        if (not column.alert and row._data and
+                row._data.get(column.name) == datum):
             new_value = row._changes.get(column.name)
             if new_value is None or new_value == datum:
                 return
diff --git a/python/ovs/dirs.py b/python/ovs/dirs.py
index b5e68a0..10571db 100644
--- a/python/ovs/dirs.py
+++ b/python/ovs/dirs.py
@@ -1,8 +1,8 @@ 
 import os
-PKGDATADIR = os.environ.get("OVS_PKGDATADIR", """/usr/local/share/openvswitch""")
-RUNDIR = os.environ.get("OVS_RUNDIR", """/var/run""")
-LOGDIR = os.environ.get("OVS_LOGDIR", """/usr/local/var/log""")
-BINDIR = os.environ.get("OVS_BINDIR", """/usr/local/bin""")
+PKGDATADIR = os.environ.get("OVS_PKGDATADIR", "/usr/local/share/openvswitch")
+RUNDIR = os.environ.get("OVS_RUNDIR", "/var/run")
+LOGDIR = os.environ.get("OVS_LOGDIR", "/usr/local/var/log")
+BINDIR = os.environ.get("OVS_BINDIR", "/usr/local/bin")
 
 DBDIR = os.environ.get("OVS_DBDIR")
 if not DBDIR:
@@ -10,4 +10,4 @@  if not DBDIR:
     if sysconfdir:
         DBDIR = "%s/openvswitch" % sysconfdir
     else:
-        DBDIR = """/usr/local/etc/openvswitch"""
+        DBDIR = "/usr/local/etc/openvswitch"
diff --git a/python/ovs/socket_util.py b/python/ovs/socket_util.py
index a01c3aa..8651c31 100644
--- a/python/ovs/socket_util.py
+++ b/python/ovs/socket_util.py
@@ -112,10 +112,12 @@  def make_unix_socket(style, nonblock, bind_path, connect_path, short=False):
                 dirname = os.path.dirname(connect_path)
                 basename = os.path.basename(connect_path)
                 try:
-                    connect_dirfd = os.open(dirname, os.O_DIRECTORY | os.O_RDONLY)
+                    connect_dirfd = os.open(dirname,
+                                            os.O_DIRECTORY | os.O_RDONLY)
                 except OSError as err:
                     return get_exception_errno(err), None
-                short_connect_path = "/proc/self/fd/%d/%s" % (connect_dirfd, basename)
+                short_connect_path = "/proc/self/fd/%d/%s" % (connect_dirfd,
+                                                              basename)
 
             if bind_path is not None:
                 dirname = os.path.dirname(bind_path)
@@ -124,10 +126,12 @@  def make_unix_socket(style, nonblock, bind_path, connect_path, short=False):
                     bind_dirfd = os.open(dirname, os.O_DIRECTORY | os.O_RDONLY)
                 except OSError as err:
                     return get_exception_errno(err), None
-                short_bind_path = "/proc/self/fd/%d/%s" % (bind_dirfd, basename)
+                short_bind_path = "/proc/self/fd/%d/%s" % (bind_dirfd,
+                                                           basename)
 
             try:
-                return make_unix_socket(style, nonblock, short_bind_path, short_connect_path)
+                return make_unix_socket(style, nonblock, short_bind_path,
+                                        short_connect_path)
             finally:
                 if connect_dirfd is not None:
                     os.close(connect_dirfd)
diff --git a/python/tox.ini b/python/tox.ini
index db123eb..625dd12 100644
--- a/python/tox.ini
+++ b/python/tox.ini
@@ -16,5 +16,5 @@  deps = -r{toxinidir}/requirements.txt
 commands = flake8
 
 [flake8]
-ignore=E111,E113,E126,E127,E128,E129,E131,E201,E203,E226,E231,E241,E251,E261,E262,E265,E271,E501
+ignore=E111,E113,E126,E127,E128,E129,E131,E201,E203,E226,E231,E241,E251,E261,E262,E265,E271
 exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build