Skip to content

Commit 6167fac

Browse files
committed
Format code with black
1 parent ab93ce8 commit 6167fac

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

can/interfaces/socketcan/socketcan.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,9 @@ def capture_message(
519519
"""
520520
# Fetching the Arb ID, DLC and Data
521521
try:
522-
cf, ancillary_data, msg_flags, addr = sock.recvmsg(CANFD_MTU, RECEIVED_ANCILLARY_BUFFER_SIZE)
522+
cf, ancillary_data, msg_flags, addr = sock.recvmsg(
523+
CANFD_MTU, RECEIVED_ANCILLARY_BUFFER_SIZE
524+
)
523525
if get_channel:
524526
channel = addr[0] if isinstance(addr, tuple) else addr
525527
else:
@@ -533,7 +535,7 @@ def capture_message(
533535
assert len(ancillary_data) == 1, "only requested a single extra field"
534536
cmsg_level, cmsg_type, cmsg_data = ancillary_data[0]
535537
assert (
536-
cmsg_level == socket.SOL_SOCKET and cmsg_type == SO_TIMESTAMPNS
538+
cmsg_level == socket.SOL_SOCKET and cmsg_type == SO_TIMESTAMPNS
537539
), "received control message type that was not requested"
538540
# see https://man7.org/linux/man-pages/man3/timespec.3.html -> struct timespec for details
539541
seconds, nanoseconds = RECEIVED_TIMESTAMP_STRUCT.unpack_from(cmsg_data)

0 commit comments

Comments
 (0)