From: Jason Ish Date: Tue, 9 Jan 2018 20:22:52 +0000 (-0600) Subject: runner: python3 fixes X-Git-Tag: suricata-6.0.4~547 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=43ef38aa66830398d1bceb443ace7cc6c820e65a;p=thirdparty%2Fsuricata-verify.git runner: python3 fixes --- diff --git a/run.py b/run.py index 6858a2ec9..5b86dbafb 100755 --- a/run.py +++ b/run.py @@ -67,6 +67,7 @@ def get_suricata_version(): def pipe_reader(fileobj, output=None, verbose=False): for line in fileobj: + line = line.decode() if output: output.write(line) if verbose: @@ -141,7 +142,7 @@ class SuricataConfig: def load_build_info(self): output = subprocess.check_output(["./src/suricata", "--build-info"]) for line in output.splitlines(): - if line.startswith("Features:"): + if line.decode().startswith("Features:"): self.features = set(line.split()[1:]) def has_feature(self, feature): @@ -183,7 +184,7 @@ class ShellCheck: def run(self): output = subprocess.check_output(self.config["args"], shell=True) if "expect" in self.config: - return str(self.config["expect"]) == output.strip() + return str(self.config["expect"]) == output.decode().strip() return True class StatsCheck: