Commit e360320f authored by Vladimir Malenovsky's avatar Vladimir Malenovsky
Browse files

fix process() return type in dryrun path when returnOutput=True

parent 003c43da
Loading
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1362,7 +1362,7 @@ class MLDConformance:
        contextPrefix: str = "",
        emitConsole: bool = True,
        returnOutput: bool = False,
    ) -> int:
    ) -> Union[int, Tuple[int, str]]:
        contextPrefix = contextPrefix or (f"[{tag}]" if tag else "")
        return self._process(
            command,
@@ -1381,12 +1381,14 @@ class MLDConformance:
        contextPrefix: str = "",
        emitConsole: bool = True,
        returnOutput: bool = False,
    ) -> int:
    ) -> Union[int, Tuple[int, str]]:
        prefix = (contextPrefix + " ") if contextPrefix else ""
        if self.args.verbose and emitConsole:
            print(f"{prefix}Command: {command}", flush=True)
        if self.args.dryrun:
            self.appendRunlog(command=command)
            if returnOutput:
                return 0, ""
            return 0

        c = subprocess.run(