projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
netdev: Remove netdev_get_vlan_vid().
[openvswitch]
/
python
/
ovs
/
socket_util.py
diff --git
a/python/ovs/socket_util.py
b/python/ovs/socket_util.py
index 65fe94d18500900237d2abd4f8175481464c8bb6..83c82046e903515078c20a084157fc3c4b63fead 100644
(file)
--- a/
python/ovs/socket_util.py
+++ b/
python/ovs/socket_util.py
@@
-13,13
+13,15
@@
# limitations under the License.
import errno
# limitations under the License.
import errno
-import logging
import os
import select
import socket
import sys
import ovs.fatal_signal
import os
import select
import socket
import sys
import ovs.fatal_signal
+import ovs.vlog
+
+vlog = ovs.vlog.Vlog("socket_util")
def make_unix_socket(style, nonblock, bind_path, connect_path):
def make_unix_socket(style, nonblock, bind_path, connect_path):
@@
-114,8
+116,7
@@
def get_null_fd():
try:
null_fd = os.open("/dev/null", os.O_RDWR)
except OSError, e:
try:
null_fd = os.open("/dev/null", os.O_RDWR)
except OSError, e:
- logging.error("could not open /dev/null: %s"
- % os.strerror(e.errno))
+ vlog.err("could not open /dev/null: %s" % os.strerror(e.errno))
return -e.errno
return null_fd
return -e.errno
return null_fd
@@
-135,7
+136,7
@@
def write_fully(fd, buf):
if retval == len(buf):
return 0, bytes_written + len(buf)
elif retval == 0:
if retval == len(buf):
return 0, bytes_written + len(buf)
elif retval == 0:
-
logging.warning
("write returned 0")
+
vlog.warn
("write returned 0")
return errno.EPROTO, bytes_written
else:
bytes_written += retval
return errno.EPROTO, bytes_written
else:
bytes_written += retval
@@
-148,5
+149,5
@@
def set_nonblocking(sock):
try:
sock.setblocking(0)
except socket.error, e:
try:
sock.setblocking(0)
except socket.error, e:
-
logging.erro
r("could not set nonblocking mode on socket: %s"
-
% os.strerror(get_socket_error(e)))
+
vlog.er
r("could not set nonblocking mode on socket: %s"
+ % os.strerror(get_socket_error(e)))