Convert WPS NFC python scripts from using wpactrl to wpaspy
Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
15cb4772d6
commit
c3aa4da94d
2 changed files with 6 additions and 8 deletions
|
@ -18,7 +18,7 @@ import nfc.handover
|
|||
import logging
|
||||
logging.basicConfig()
|
||||
|
||||
import wpactrl
|
||||
import wpaspy
|
||||
|
||||
wpas_ctrl = '/var/run/hostapd'
|
||||
|
||||
|
@ -37,10 +37,9 @@ def wpas_connect():
|
|||
|
||||
for ctrl in ifaces:
|
||||
try:
|
||||
wpas = wpactrl.WPACtrl(ctrl)
|
||||
wpas = wpaspy.Ctrl(ctrl)
|
||||
return wpas
|
||||
except wpactrl.error, error:
|
||||
print "Error: ", error
|
||||
except Exception, e:
|
||||
pass
|
||||
return None
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ import nfc.handover
|
|||
import logging
|
||||
logging.basicConfig()
|
||||
|
||||
import wpactrl
|
||||
import wpaspy
|
||||
|
||||
wpas_ctrl = '/var/run/wpa_supplicant'
|
||||
|
||||
|
@ -39,10 +39,9 @@ def wpas_connect():
|
|||
|
||||
for ctrl in ifaces:
|
||||
try:
|
||||
wpas = wpactrl.WPACtrl(ctrl)
|
||||
wpas = wpaspy.Ctrl(ctrl)
|
||||
return wpas
|
||||
except wpactrl.error, error:
|
||||
print "Error: ", error
|
||||
except Exception, e:
|
||||
pass
|
||||
return None
|
||||
|
||||
|
|
Loading…
Reference in a new issue