Remove deprecated SystemAPI
This commit is contained in:
parent
54f3938088
commit
134ee68cfa
1 changed files with 0 additions and 34 deletions
|
@ -181,40 +181,6 @@ class ClojureFileHandler(FileHandler):
|
||||||
clj_file.truncate()
|
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():
|
class GitApi():
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
|
Loading…
Reference in a new issue