Skip to content

Commit 35e847f

Browse files
Fixed pcan Unpack error (#1767)
* Fixed pcan Unpack error PCANBasic.GetValue() must always return a Tuple with 2 elements, otherwise PcanBus._detect_available_configs() raises a "not enough values to unpack" error at line 718. * Fixed typo
1 parent 25d6999 commit 35e847f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

can/interfaces/pcan/basic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -967,7 +967,7 @@ def GetValue(self, Channel, Parameter):
967967
elif Parameter == PCAN_ATTACHED_CHANNELS:
968968
res = self.GetValue(Channel, PCAN_ATTACHED_CHANNELS_COUNT)
969969
if TPCANStatus(res[0]) != PCAN_ERROR_OK:
970-
return (TPCANStatus(res[0]),)
970+
return TPCANStatus(res[0]), ()
971971
mybuffer = (TPCANChannelInformation * res[1])()
972972

973973
elif (

0 commit comments

Comments
 (0)