Copyedit error messages

This commit is contained in:
Dan Halbert 2025-02-23 09:57:30 -05:00 committed by GitHub
parent af3eaa33d4
commit 6c353a2d78
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -154,8 +154,7 @@ class NetworkBase:
env_value = secrets.get(secrets_setting_name) env_value = secrets.get(secrets_setting_name)
if env_value is not None: if env_value is not None:
warnings.warn( warnings.warn(
"The using of `secrets`, is deprecated. Please put your settings in " "Using secrets.py for network settings is deprecated. Put your settings in settings.toml."
"settings.toml"
) )
self._settings[setting_name] = env_value self._settings[setting_name] = env_value
return env_value return env_value
@ -225,8 +224,8 @@ class NetworkBase:
aio_key = self._get_setting("ADAFRUIT_AIO_KEY") aio_key = self._get_setting("ADAFRUIT_AIO_KEY")
except KeyError: except KeyError:
raise KeyError( raise KeyError(
"\n\nOur time service requires a login/password to rate-limit. " "\nThe Adafruit IO time service requires a login and password. "
"Please register for a free adafruit.io account and place the user/key in " "Rgister for a free adafruit.io account and put the username and key in "
"your settings.toml file under 'ADAFRUIT_AIO_USERNAME' and 'ADAFRUIT_AIO_KEY'" "your settings.toml file under 'ADAFRUIT_AIO_USERNAME' and 'ADAFRUIT_AIO_KEY'"
) from KeyError ) from KeyError
@ -257,7 +256,7 @@ class NetworkBase:
reply = response.text reply = response.text
except KeyError: except KeyError:
raise KeyError( raise KeyError(
"Was unable to lookup the time, try setting 'timezone' in your settings.toml" "Unable to lookup the time, try setting 'timezone' in your settings.toml"
"according to http://worldtimeapi.org/timezones" "according to http://worldtimeapi.org/timezones"
) from KeyError ) from KeyError
# now clean up # now clean up