diff options
author | Ilya Etingof <etingof@gmail.com> | 2019-01-11 08:03:07 +0100 |
---|---|---|
committer | Ilya Etingof <etingof@gmail.com> | 2019-01-11 08:03:07 +0100 |
commit | 35275000baec73639cc2c4eb1153ab94cbe58dbd (patch) | |
tree | 8d648cb71a61d0a46890eb45b6cf7a401b0189de | |
parent | 11eb3fa691c6889a2d66ee3417d562deb6b35ec4 (diff) | |
download | pysnmp-git-35275000baec73639cc2c4eb1153ab94cbe58dbd.tar.gz |
Fix socket iov blob dump in debug
-rw-r--r-- | pysnmp/carrier/sockmsg.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/pysnmp/carrier/sockmsg.py b/pysnmp/carrier/sockmsg.py index 97273306..909407a9 100644 --- a/pysnmp/carrier/sockmsg.py +++ b/pysnmp/carrier/sockmsg.py @@ -31,7 +31,8 @@ else: import ctypes import ipaddress import socket - from pysnmp.carrier import sockfix, error + from pysnmp.carrier import sockfix + from pysnmp.carrier import error uint32_t = ctypes.c_uint32 in_addr_t = uint32_t @@ -92,7 +93,7 @@ else: debug.logger & debug.flagIO and debug.logger( 'recvfrom: received %d octets from %s to %s; ' - 'iov blob %s' % (len(data), _from, _to, debug.hexdump(ancdata))) + 'iov blob %r' % (len(data), _from, _to, ancdata)) return data, addressType(_from).setLocalAddress(_to) @@ -120,7 +121,8 @@ else: ancdata = [(socket.SOL_IPV6, socket.IPV6_PKTINFO, memoryview(_f).tobytes())] debug.logger & debug.flagIO and debug.logger( - 'sendto: sending %d octets to %s; iov blob %s' % (len(data), _to, debug.hexdump(ancdata))) + 'sendto: sending %d octets to %s; ' + 'iov blob %r' % (len(data), _to, ancdata)) return s.sendmsg([_data], ancdata, 0, _to) |