tests: Initialize hapd variable before try-finally uses
authorJonathan Afek <jonathan@wizery.com>
Thu, 23 Jun 2016 17:16:32 +0000 (20:16 +0300)
committerJouni Malinen <j@w1.fi>
Mon, 27 Jun 2016 16:04:15 +0000 (19:04 +0300)
commitf8b9e61ef0c4dd5d53fbdad315c87f2f7b54e411
tree137c2ee5172b81a8e3d93de1ab7be5590897403d
parent643be15d41eda181d8aeafda2d28fc628d00b294
tests: Initialize hapd variable before try-finally uses

Some TDLS and WPS test cases reference the hapd variable in the finally
block even if the test failed before assigning the value to this
variable. This makes the code in the finally block to fail on
referencing this variable. Assign None to the hapd variable before
starting the tests to avoid this.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
tests/hwsim/test_ap_tdls.py
tests/hwsim/test_nfc_wps.py