You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maybe something like this, probably add private 'put' function. Possibly call another function, as you can change anything with the put. Was in a rush, did this - much thanks much for your project.
def set_wlan_pass(self, ssid, key):
"""Changes the password for a given
ssid. Daniel ToDo: Put method. """
for wlan in self._api_read('list/wlanconf'):
if wlan['name'] == ssid:
wlan_id = wlan['_id']
wlan_settings = {}
wlan_settings["x_passphrase"] = key
params = json.dumps(wlan_settings)
url = 'rest/wlanconf/' + wlan_id
r = self.session.put(self._api_url() + url,
params)
if r.status_code is not 200:
raise APIError("Login failed - status code: %i" %
r.status_code)
return
The text was updated successfully, but these errors were encountered:
Maybe something like this, probably add private 'put' function. Possibly call another function, as you can change anything with the put. Was in a rush, did this - much thanks much for your project.
The text was updated successfully, but these errors were encountered: