]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
runner: python3 fixes
authorJason Ish <ish@unx.ca>
Tue, 9 Jan 2018 20:22:52 +0000 (14:22 -0600)
committerJason Ish <ish@unx.ca>
Tue, 9 Jan 2018 20:22:52 +0000 (14:22 -0600)
run.py

diff --git a/run.py b/run.py
index 6858a2ec9671d8448d868905b3ff92399d831baa..5b86dbafb9fa83050cdfada548b025bf3f3d2eed 100755 (executable)
--- 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: