@@ -375,10 +375,9 @@ def __init__(self, channel, can_filters=None, **kwargs):
375375 self .single_handle = single_handle
376376
377377 num_channels = ctypes .c_int (0 )
378- res = canGetNumberOfChannels (ctypes .byref (num_channels ))
379- #log.debug("Res: {}".format(res))
378+ #log.debug("Res: %d", canGetNumberOfChannels(ctypes.byref(num_channels)))
380379 num_channels = int (num_channels .value )
381- log .info ('Found %d available channels' % num_channels )
380+ log .info ('Found %d available channels' , num_channels )
382381 for idx in range (num_channels ):
383382 channel_info = get_channel_info (idx )
384383 log .info ('%d: %s' , idx , channel_info )
@@ -391,7 +390,7 @@ def __init__(self, channel, can_filters=None, **kwargs):
391390 if fd :
392391 flags |= canstat .canOPEN_CAN_FD
393392
394- log .debug ('Creating read handle to bus channel: %s' % channel )
393+ log .debug ('Creating read handle to bus channel: %s' , channel )
395394 self ._read_handle = canOpenChannel (channel , flags )
396395 canIoCtl (self ._read_handle ,
397396 canstat .canIOCTL_SET_TIMER_SCALE ,
@@ -427,7 +426,7 @@ def __init__(self, channel, can_filters=None, **kwargs):
427426 log .debug ("We don't require separate handles to the bus" )
428427 self ._write_handle = self ._read_handle
429428 else :
430- log .debug ('Creating separate handle for TX on channel: %s' % channel )
429+ log .debug ('Creating separate handle for TX on channel: %s' , channel )
431430 self ._write_handle = canOpenChannel (channel , flags )
432431 canBusOn (self ._read_handle )
433432
0 commit comments