Fix storing of rooms in the configuration file

Closes https://git.vvvvvvaria.org/decentral1se/xbotlib/issues/10.
This commit is contained in:
Luke Murphy 2021-02-01 21:44:58 +01:00
parent 8e7db79903
commit 3bbb799ed4
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
2 changed files with 5 additions and 4 deletions

View File

@ -4,6 +4,7 @@
- Fix logging of exceptions and increase info for stack traces ([#2](https://github.com/decentral1se/xbotlib/issues/2)) - Fix logging of exceptions and increase info for stack traces ([#2](https://github.com/decentral1se/xbotlib/issues/2))
- Format JSON to human readable when saving ([#8](https://git.vvvvvvaria.org/decentral1se/xbotlib/issues/8)) - Format JSON to human readable when saving ([#8](https://git.vvvvvvaria.org/decentral1se/xbotlib/issues/8))
- Fix room formatting when storing in configuration files ([#10](https://git.vvvvvvaria.org/decentral1se/xbotlib/issues/10))
# xbotlib 0.15.2 (2021-01-24) # xbotlib 0.15.2 (2021-01-24)

View File

@ -381,15 +381,15 @@ class Bot(ClientXMPP):
) )
rooms = input("Rooms: ") rooms = input("Rooms: ")
if rooms:
rooms = [r.strip() for r in rooms.split(",")]
inputs = { inputs = {
"account": account, "account": account,
"password": password, "password": password,
"nick": nick, "nick": nick,
"rooms": rooms,
} }
if rooms:
inputs["rooms"] = rooms
self.log.debug(f"Received {inputs} as input") self.log.debug(f"Received {inputs} as input")
config = ConfigParser() config = ConfigParser()