From 134ee68cfada86174963b40ca55060f4c33ac6c7 Mon Sep 17 00:00:00 2001 From: bom Date: Fri, 21 Apr 2023 14:52:06 +0200 Subject: [PATCH] Remove deprecated SystemAPI --- .../release_mixin/infrastructure_api.py | 34 ------------------- 1 file changed, 34 deletions(-) diff --git a/src/main/python/ddadevops/infrastructure/release_mixin/infrastructure_api.py b/src/main/python/ddadevops/infrastructure/release_mixin/infrastructure_api.py index 036568e..09587b9 100644 --- a/src/main/python/ddadevops/infrastructure/release_mixin/infrastructure_api.py +++ b/src/main/python/ddadevops/infrastructure/release_mixin/infrastructure_api.py @@ -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):