Skip to content

Commit

Permalink
Merge pull request #45 from justmobilize/remove-secrets-usage
Browse files Browse the repository at this point in the history
Remove secrets usage
  • Loading branch information
FoamyGuy authored Mar 3, 2025
2 parents da9cc9f + e50eb93 commit 7863e5b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
13 changes: 6 additions & 7 deletions adafruit_funhouse/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,12 @@ def __init__(

def init_io_mqtt(self) -> IO_MQTT:
"""Initialize MQTT for Adafruit IO"""
try:
aio_username = self._get_setting("AIO_USERNAME")
aio_key = self._get_setting("AIO_KEY")
except KeyError:
raise KeyError(
"Adafruit IO secrets are kept in settings.toml, please add them there!\n\n"
) from KeyError
aio_username = self._get_setting["ADAFRUIT_AIO_USERNAME"]
aio_key = self._get_setting["ADAFRUIT_AIO_KEY"]
if None in [aio_username, aio_key]:
raise AttributeError(
"Adafruit IO keys are kept in settings.toml, please add them there."
)

return self.init_mqtt(IO_MQTT_BROKER, 8883, aio_username, aio_key, True)

Expand Down
1 change: 0 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
"ssl",
"wifi",
"socketpool",
"secrets",
"analogio",
"touchio",
"bitmaptools",
Expand Down

0 comments on commit 7863e5b

Please sign in to comment.