]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Use bytes in a few places
authorJohannes Berg <johannes.berg@intel.com>
Thu, 28 May 2020 17:52:39 +0000 (19:52 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 10 Jun 2020 18:12:44 +0000 (21:12 +0300)
With python3 bytes are returned for stdout, so need to use b''
strings instead of normal strings. These are just a few places
I ran into, almost certainly more places need it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
tests/hwsim/test_ap_vht.py
tests/hwsim/test_he.py

index 8ffa8189593d0f2a72f89c5132106f40c5ea5c5b..2b691ff710256534b8d80da72eba0f31d67286e4 100644 (file)
@@ -553,7 +553,7 @@ def run_ap_vht160_no_dfs(dev, apdev, channel, ht_capab):
             cmd = subprocess.Popen(["iw", "reg", "get"], stdout=subprocess.PIPE)
             reg = cmd.stdout.readlines()
             for r in reg:
-                if "5490" in r and "DFS" in r:
+                if b"5490" in r and b"DFS" in r:
                     raise HwsimSkip("ZA regulatory rule did not have DFS requirement removed")
             raise Exception("AP setup timed out")
 
index f033285a6201560ef613ab22a738f3b4fa85bbae..28123e853ca12dad328f78d46d173debd1704a27 100644 (file)
@@ -623,7 +623,7 @@ def run_ap_he160_no_dfs(dev, apdev, channel, ht_capab):
             cmd = subprocess.Popen(["iw", "reg", "get"], stdout=subprocess.PIPE)
             reg = cmd.stdout.readlines()
             for r in reg:
-                if "5490" in r and "DFS" in r:
+                if b"5490" in r and b"DFS" in r:
                     raise HwsimSkip("ZA regulatory rule did not have DFS requirement removed")
             raise Exception("AP setup timed out")