Don't raise if email is blank. Maybe secret migration?
This commit is contained in:
parent
441c91b9dc
commit
084fce51a6
|
@ -77,16 +77,16 @@ defmodule Farmbot.Bootstrap.AuthTask do
|
|||
|
||||
defp fetch_email do
|
||||
email = get_config_value(:string, "authorization", "email")
|
||||
email || raise "No email provided."
|
||||
email || raise "No email provided for token refresh."
|
||||
end
|
||||
|
||||
defp fetch_pass do
|
||||
pass = get_config_value(:string, "authorization", "password")
|
||||
pass || raise "No password provided."
|
||||
pass || raise "No password provided for token refresh."
|
||||
end
|
||||
|
||||
defp fetch_server do
|
||||
server = get_config_value(:string, "authorization", "server")
|
||||
server || raise "No server provided."
|
||||
server || raise "No server provided for token refresh."
|
||||
end
|
||||
end
|
||||
|
|
|
@ -102,9 +102,9 @@ defmodule Farmbot.Bootstrap.Supervisor do
|
|||
server = get_config_value(:string, "authorization", "server")
|
||||
|
||||
# Make sure they aren't empty.
|
||||
email || raise "No email provided."
|
||||
pass || raise "No password provided."
|
||||
server || raise "No server provided."
|
||||
email || Logger.warn 1, "Could not find email in configuration. "
|
||||
pass || raise "No password provided in config storage."
|
||||
server || raise "No server provided in config storage"
|
||||
{email, pass, server}
|
||||
rescue
|
||||
e in RuntimeError -> {:error, Exception.message(e)}
|
||||
|
|
|
@ -16,7 +16,7 @@ defmodule Farmbot.Target.Network do
|
|||
def to_network_config(config)
|
||||
|
||||
def to_network_config(%NetworkInterface{ssid: ssid, psk: psk, type: "wireless"} = config) do
|
||||
Logger.debug(3, "wireless network config: ssid: #{config.ssid}, psk: #{config.psk}")
|
||||
Logger.debug(3, "wireless network config: ssid: #{config.ssid}")
|
||||
{config.name, [ssid: ssid, key_mgmt: :"WPA-PSK", psk: psk]}
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue