[ovs-dev] [PATCH] python: fix a typo error in python/ovs/socket_util.py.

Alex Wang alexw at nicira.com
Thu Apr 18 00:35:04 UTC 2013


The commit 89d7ffa9 (python: Workaround UNIX socket path
length limits), fixes most failed tests. But it has a
typo and the typo causes the failure of test <unixctl
server errors - Python> when the path length is very
long (e.g. more than 90 characters).

This patch fixes the above issue.

Signed-off-by: Alex Wang <alexw at nicira.com>
---
 AUTHORS                   |    1 +
 python/ovs/socket_util.py |    4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index f9343de..feb5c72 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -3,6 +3,7 @@ signed off on commits in the Open vSwitch version control repository.
 
 Aaron Rosen             arosen at clemson.edu
 Alexey I. Froloff       raorn at altlinux.org
+Alex Wang               alexw at nicira.com
 Andrew Evans            aevans at nicira.com
 Andrew Lambeth          wal at nicira.com
 Andy Southgate          andy.southgate at citrix.com
diff --git a/python/ovs/socket_util.py b/python/ovs/socket_util.py
index 7bfefc4..7dac5bb 100644
--- a/python/ovs/socket_util.py
+++ b/python/ovs/socket_util.py
@@ -87,7 +87,7 @@ def make_unix_socket(style, nonblock, bind_path, connect_path):
                 try:
                     connect_dirfd = os.open(dirname, os.O_DIRECTORY | os.O_RDONLY)
                 except OSError, err:
-                    return get_exception_errno(e), None
+                    return get_exception_errno(err), None
                 short_connect_path = "/proc/self/fd/%d/%s" % (connect_dirfd, basename)
 
             if bind_path is not None:
@@ -96,7 +96,7 @@ def make_unix_socket(style, nonblock, bind_path, connect_path):
                 try:
                     bind_dirfd = os.open(dirname, os.O_DIRECTORY | os.O_RDONLY)
                 except OSError, err:
-                    return get_exception_errno(e), None
+                    return get_exception_errno(err), None
                 short_bind_path = "/proc/self/fd/%d/%s" % (bind_dirfd, basename)
 
             try:
-- 
1.7.9.5




More information about the dev mailing list