Update dbc.py
BUG fixing:
Prevents ValueError in case of  result = message_attributes['GenMsgSendType'].value is a String value.
Necessary in case of Evnet-based sending like in that dbc attribute expression:
BA_ "GenMsgSendType" BO_ 1373 "Event";
BA_ "GenMsgCycleTime" BO_ 1373 0;
in Vector CANdb++ generated dbcs.
Greetings Maurice
@@ -1386,6 +1386,9 @@ def _load_messages(tokens,
try:
result = message_attributes['GenMsgSendType'].value
+
+ # if definitions is enum (otherwise above value is maintained) -> Prevents ValueError
+ if definitions['GenMsgSendType'].choices != None:
# Resolve ENUM index to ENUM text
result = definitions['GenMsgSendType'].choices[int(result)]
except (KeyError, TypeError):
