Skip to content

Commit

Permalink
Remove bogus ValueError from NSSEditor.build. (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeNotCharles authored Mar 13, 2024
1 parent d67b4eb commit 31e1372
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Tools/HolocronToolset/src/toolset/gui/editors/nss.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,14 +183,12 @@ def build(self) -> tuple[bytes | None, bytes]:
if self._restype != ResourceType.NCS:
return self.ui.codeEdit.toPlainText().encode("windows-1252"), b""

compiled_bytes: bytes | None = compileScript(self.ui.codeEdit.toPlainText(), self._installation.tsl, self._installation.path())
print("compiling script from nsseditor")
compiled_bytes: bytes | None = compileScript(self.ui.codeEdit.toPlainText(), self._installation.tsl, self._installation.path())
if compiled_bytes is None:
print("user cancelled the compilation")
return None, b""

msg = "Could not convert to bytes - nsseditor.build()"
raise ValueError(msg)
return compiled_bytes, b""

def new(self):
super().new()
Expand Down

0 comments on commit 31e1372

Please sign in to comment.