Skip to content

Commit

Permalink
tlv add version uses normal string ie "2.4"
Browse files Browse the repository at this point in the history
  • Loading branch information
bradjc committed Jan 23, 2024
1 parent 2aceb27 commit cb7aedc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tockloader/tbfh.py
Original file line number Diff line number Diff line change
Expand Up @@ -638,9 +638,10 @@ def __init__(self, buffer, parameters=[]):
self.valid = True
else:
try:
if len(parameters) == 2:
self.kernel_major = int(parameters[0], 0)
self.kernel_minor = int(parameters[1], 0)
if len(parameters) == 1:
fields = parameters[0].split(".")
self.kernel_major = int(fields[0], 0)
self.kernel_minor = int(fields[1], 0)
self.valid = True
except:
logging.error("Failed parsing params for TLVID={}".format(self.TLVID))
Expand Down

0 comments on commit cb7aedc

Please sign in to comment.