diff options
author | Ben Pfaff <blp@nicira.com> | 2012-03-07 15:41:30 -0800 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2012-03-07 16:33:14 -0800 |
commit | daad9316430795b0a9ee5d4ec89b9538101424ed (patch) | |
tree | c377547d0828b23753d6bbabc1cd152214e17fb6 /python | |
parent | eaae5809c0115635b600043d35b4233572228e15 (diff) | |
download | openvswitch-daad9316430795b0a9ee5d4ec89b9538101424ed.tar.gz |
python socket_util: Use correct fatal_signal function on error path.
The correct function to call here is "remove_file_to_unlink". That is,
since the file has already been unlinked there is no need to keep it on
the list of files to unlink.
However, "unlink_file_now" simplifies the code, so we might as well use
that.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'python')
-rw-r--r-- | python/ovs/socket_util.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/python/ovs/socket_util.py b/python/ovs/socket_util.py index 0a26c5de6..d00d3989b 100644 --- a/python/ovs/socket_util.py +++ b/python/ovs/socket_util.py @@ -70,11 +70,7 @@ def make_unix_socket(style, nonblock, bind_path, connect_path): except socket.error, e: sock.close() if bind_path is not None: - try: - os.unlink(bind_path) - except OSError, e: - pass - ovs.fatal_signal.add_file_to_unlink(bind_path) + ovs.fatal_signal.unlink_file_now(bind_path) return get_exception_errno(e), None |