wpaspy: Fix potentially referencing non existing attribute
authorJonathan Afek <jonathan@wizery.com>
Thu, 19 May 2016 13:06:47 +0000 (16:06 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 28 May 2016 13:34:09 +0000 (16:34 +0300)
commit93568233bc518bffb5680a0dbc42fb8fada87d1e
tree33c7244926e9fef8914c20d7e3f1c14fa48ef3cd
parent5b45f478c28a5e48b25222ae60be4f60f48244c0
wpaspy: Fix potentially referencing non existing attribute

In wpaspy.py in the Ctrl object constructor there is a try/except. In
the except part the code references the s attribute of the object. This
attribute is only created later in the try part. If an exception occurs
before the attribute creation then the except part references a non
existing attribute. Fix that by assigning None to the s attribute at the
beginning of the try part.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
wpaspy/wpaspy.py