Skip to content

Commit

Permalink
optimise for #1259
Browse files Browse the repository at this point in the history
  • Loading branch information
Furtif committed Sep 27, 2024
1 parent 9eae438 commit 0d9088c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ecu.py
Original file line number Diff line number Diff line change
Expand Up @@ -645,9 +645,10 @@ def setValue(self, value, bytes_list, dataitem, ecu_endian, test_mode=False):

try:
valueasint = int("0b" + requestasbin, 2)
except:
raise (_("Value of this stuff need a bypass gateway maybe. Value:") + " %s" % requestasbin)
# return {}
except ValueError:
print (_("Value error of this stuff need a bypass gateway maybe. Value:") + " %s" % requestasbin)
# this need a break maybe empty and or raise, try empty..
return {}

valueashex = hex(valueasint)[2:].replace("L", "").zfill(numreqbytes * 2).upper()

Expand Down

0 comments on commit 0d9088c

Please sign in to comment.