Skip to content

Commit

Permalink
Loosen ASM program string methods to warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
kg583 committed Jan 3, 2024
1 parent c57ca92 commit e9f9176
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tivars/types/tokenized.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,16 @@ def get_min_os(self, data: bytes = None) -> OsVersion:

@Loader[str]
def load_string(self, string: str, *, model: TIModel = None, lang: str = None):
raise NotImplementedError
warn("ASM programs may not have tokenized data.",
UserWarning)

super().load_string(string, model=model, lang=lang)

def string(self) -> str:
warn("ASM programs may not have tokenized data.",
UserWarning)

return super().string()


class TIProtectedProgram(TIProgram, register=True):
Expand Down

0 comments on commit e9f9176

Please sign in to comment.