Skip to content

Commit

Permalink
Fix Samedec Check (very dumb fix someone edit it later)
Browse files Browse the repository at this point in the history
  • Loading branch information
reggietorres committed Mar 5, 2024
1 parent 1237737 commit a90532b
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions asmara.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,28 +243,29 @@ def __decoder__(self):
sev=severity.trace,
)
try:
if not (
"samedec 0.1."
if (
"samedec 0.2." or "samedec 0.3." or "samedec 0.4."
in Popen(["samedec", "-V"], stdout=PIPE)
.communicate()[0]
.decode("UTF-8")
.strip()
):
utilities.autoPrint(
text=f"SAMEDEC is not version 0.2 or higher! Recommended version is 0.2.3.",
classType="DECODER",
sev=severity.fatal,
)
AS_MAN.killAsmara()
exit(1)
else:
self.__decode__ = Popen(
["samedec", "-r", "24000"],
stdout=PIPE,
stdin=PIPE,
stderr=PIPE,
bufsize=1,
)
else:
utilities.autoPrint(
text=f"SAMEDEC is not version 0.2 or higher! Recommended version is 0.2.3.",
classType="DECODER",
sev=severity.fatal,
)
AS_MAN.killAsmara()
exit(1)

except FileNotFoundError:
utilities.autoPrint(
text=f"Samedec is not installed on the computer. Please install SAMEDEC 0.2.3 or higher.",
Expand Down

0 comments on commit a90532b

Please sign in to comment.