Handle missing optional variables
This commit is contained in:
@ -1,5 +1,9 @@
|
|||||||
# xbotlib x.x.x (UNRELEASED)
|
# xbotlib x.x.x (UNRELEASED)
|
||||||
|
|
||||||
|
# xbotlib 0.3.2 (2021-01-12)
|
||||||
|
|
||||||
|
- Fix config parser environment loading for missing optional variables
|
||||||
|
|
||||||
# xbotlib 0.3.1 (2021-01-12)
|
# xbotlib 0.3.1 (2021-01-12)
|
||||||
|
|
||||||
- Support `--no-input` flag and read configuration from the environment
|
- Support `--no-input` flag and read configuration from the environment
|
||||||
|
@ -4,7 +4,7 @@ build-backend = "poetry.masonry.api"
|
|||||||
|
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "xbotlib"
|
name = "xbotlib"
|
||||||
version = "0.3.1"
|
version = "0.3.2"
|
||||||
description = "XMPP bots for humans"
|
description = "XMPP bots for humans"
|
||||||
authors = ["decentral1se <lukewm@riseup.net>"]
|
authors = ["decentral1se <lukewm@riseup.net>"]
|
||||||
maintainers = ["decentral1se <lukewm@riseup.net>"]
|
maintainers = ["decentral1se <lukewm@riseup.net>"]
|
||||||
|
@ -101,8 +101,8 @@ class Bot(ClientXMPP):
|
|||||||
self.config["bot"] = {}
|
self.config["bot"] = {}
|
||||||
self.config["bot"]["jid"] = environ.get("XBOT_JID")
|
self.config["bot"]["jid"] = environ.get("XBOT_JID")
|
||||||
self.config["bot"]["password"] = environ.get("XBOT_PASSWORD")
|
self.config["bot"]["password"] = environ.get("XBOT_PASSWORD")
|
||||||
self.config["bot"]["room"] = environ.get("XBOT_ROOM")
|
self.config["bot"]["room"] = environ.get("XBOT_ROOM", "")
|
||||||
self.config["bot"]["nick"] = environ.get("XBOT_NICK")
|
self.config["bot"]["nick"] = environ.get("XBOT_NICK", "")
|
||||||
|
|
||||||
def init_bot(self):
|
def init_bot(self):
|
||||||
"""Initialise bot with connection details."""
|
"""Initialise bot with connection details."""
|
||||||
|
Reference in New Issue
Block a user