On Fri, 2019-01-25 at 11:26 +0100, Johannes Berg wrote: > On Thu, 2019-01-24 at 16:46 +0900, Masashi Honma wrote: > > Signed-off-by: Masashi Honma <masashi.honma@xxxxxxxxx> > > --- > > tests/hwsim/test_sigma_dut.py | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/tests/hwsim/test_sigma_dut.py b/tests/hwsim/test_sigma_dut.py > > index 3641a9dcf..7f733ef6f 100644 > > --- a/tests/hwsim/test_sigma_dut.py > > +++ b/tests/hwsim/test_sigma_dut.py > > @@ -1607,7 +1607,7 @@ def test_sigma_dut_ap_dpp_qr(dev, apdev, params): > > def test_sigma_dut_ap_dpp_qr_legacy(dev, apdev, params): > > """sigma_dut controlled AP (legacy)""" > > run_sigma_dut_ap_dpp_qr(dev, apdev, params, "ap-psk", "sta-psk", > > - extra="pass=%s" % "qwertyuiop".encode("hex")) > > + extra="pass=%s" % binascii.hexlify("qwertyuiop".encode()).decode()) > > IMHO all those "constant".encode() you have in the whole series would be > much better written as b"constant". I'm pretty sure that works on all > relevant python 2 versions (it certainly does on mine) Similarly, bytes() is better as b'' I think. And maybe we should think about making everything bytes throughout. You have a LOT of things like this here, where you do extra="pass=%s" % binascii.hexlify("qwertyuiop".encode()).decode() If we expected extra to instead be bytes (rather than string), we'd just have extra=b"pass=%s" % binascii.hexlify(b"qwertyuiop") which IMHO is way more readable. johannes _______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap