tests: Use bytes in a few places

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>
This commit is contained in:
Johannes Berg 2020-05-28 19:52:39 +02:00 committed by Jouni Malinen
parent db294952bb
commit 4dd712bd36
2 changed files with 2 additions and 2 deletions

View 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) cmd = subprocess.Popen(["iw", "reg", "get"], stdout=subprocess.PIPE)
reg = cmd.stdout.readlines() reg = cmd.stdout.readlines()
for r in reg: 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 HwsimSkip("ZA regulatory rule did not have DFS requirement removed")
raise Exception("AP setup timed out") raise Exception("AP setup timed out")

View 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) cmd = subprocess.Popen(["iw", "reg", "get"], stdout=subprocess.PIPE)
reg = cmd.stdout.readlines() reg = cmd.stdout.readlines()
for r in reg: 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 HwsimSkip("ZA regulatory rule did not have DFS requirement removed")
raise Exception("AP setup timed out") raise Exception("AP setup timed out")