From e9f9176689d64aa8546a15bebb817a0b88656087 Mon Sep 17 00:00:00 2001 From: KG Date: Wed, 3 Jan 2024 00:25:26 -0500 Subject: [PATCH] Loosen ASM program string methods to warnings --- tivars/types/tokenized.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tivars/types/tokenized.py b/tivars/types/tokenized.py index 5866947..9f07674 100644 --- a/tivars/types/tokenized.py +++ b/tivars/types/tokenized.py @@ -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):