Remove deprecated SystemAPI

This commit is contained in:
bom 2023-04-21 14:52:06 +02:00
parent 54f3938088
commit 134ee68cfa

View file

@ -181,40 +181,6 @@ class ClojureFileHandler(FileHandler):
clj_file.truncate()
class SystemApi():
def __init__(self):
self.stdout = [""]
self.stderr = [""]
self.exitcode = 0
def run(self, args: list[str]): #TODO Make stateless
sanitized_args = []
for arg in args:
str_arg = str(arg)
if str_arg is not "":
sanitized_args.append(str_arg.replace("\n", ""))
stream = sub.Popen(sanitized_args,
stdout=sub.PIPE,
stderr=sub.PIPE,
text=True,
encoding="UTF-8")
if stream.stdout is not None:
self.stdout = stream.stdout.readlines()
else:
self.stdout = None
if stream.stderr is not None:
self.stderr = stream.stderr.readlines()
else:
self.stderr = None
def run_checked(self, *args):
self.run(args)
if len(self.stderr) > 0:
raise Exception(f"Command failed with: {self.stderr}")
class GitApi():
def __init__(self):