Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
wpa2-enterprise
wpa2-mixed-enterprise
"""
args = shlex.split(line)
if (len(args) == 0):
print "Usage:"
self.do_help('add-wifi-network')
return
if (len(args) < 2):
print "Please specify WiFI security type"
return
securityType = WeaveDeviceMgr.ParseSecurityType(args[1])
if (securityType == None):
print "Unrecognized security type: " + args[1]
return
networkInfo = WeaveDeviceMgr.NetworkInfo(
networkType = WeaveDeviceMgr.NetworkType_WiFi,
wifiSSID = args[0],
wifiMode = WeaveDeviceMgr.WiFiMode_Managed,
wifiRole = WeaveDeviceMgr.WiFiRole_Station,
wifiSecurityType = securityType)
if (securityType != WeaveDeviceMgr.WiFiSecurityType_None):
if (len(args) < 3):
print "Must supply WiFi key"
return
if (len(args) > 3):