Skip to content

Commit

Permalink
Don't warn on assembly program version
Browse files Browse the repository at this point in the history
  • Loading branch information
kg583 committed Jan 6, 2025
1 parent 9480116 commit f2de4ca
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tivars/types/tokenized.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,13 +383,13 @@ def unprotect(self):
def load_bytes(self, data: bytes | BytesIO):
super(TokenizedEntry, self).load_bytes(data)

try:
if self.version != (version := self.get_version()):
warn(f"The version is incorrect (expected 0x{version:02x}, got 0x{self.version:02x}).",
BytesWarning)
if self.is_tokenized:
try:
if self.version != (version := self.get_version()):
warn(f"The version is incorrect (expected 0x{version:02x}, got 0x{self.version:02x}).",
BytesWarning)

except ValueError as e:
if self.is_tokenized:
except ValueError as e:
warn(f"The file contains an invalid token {' '.join(str(e).split()[2:])}.",
BytesWarning)

Expand Down

0 comments on commit f2de4ca

Please sign in to comment.