From 3bbb799ed45ea0cad09e169d45f7fedbd3fb7c9e Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Mon, 1 Feb 2021 21:44:58 +0100 Subject: [PATCH] Fix storing of rooms in the configuration file Closes https://git.vvvvvvaria.org/decentral1se/xbotlib/issues/10. --- CHANGELOG.md | 1 + xbotlib.py | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e1a4461..597c21e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - 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)) +- Fix room formatting when storing in configuration files ([#10](https://git.vvvvvvaria.org/decentral1se/xbotlib/issues/10)) # xbotlib 0.15.2 (2021-01-24) diff --git a/xbotlib.py b/xbotlib.py index cd13607..14e44c1 100644 --- a/xbotlib.py +++ b/xbotlib.py @@ -381,15 +381,15 @@ class Bot(ClientXMPP): ) rooms = input("Rooms: ") - if rooms: - rooms = [r.strip() for r in rooms.split(",")] - inputs = { "account": account, "password": password, "nick": nick, - "rooms": rooms, } + + if rooms: + inputs["rooms"] = rooms + self.log.debug(f"Received {inputs} as input") config = ConfigParser()