From 246a4813ec4a3accf2423afd687fec57ea7181e3 Mon Sep 17 00:00:00 2001 From: Ellis Percival <flyte@failcode.co.uk> Date: Wed, 17 May 2017 13:35:27 +0100 Subject: [PATCH] Only strip slashes from the end of the topic_prefix. #3 --- pi_mqtt_gpio/server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pi_mqtt_gpio/server.py b/pi_mqtt_gpio/server.py index e889115..b82623e 100644 --- a/pi_mqtt_gpio/server.py +++ b/pi_mqtt_gpio/server.py @@ -53,7 +53,7 @@ if __name__ == "__main__": client = mqtt.Client() user = config["mqtt"].get("user") password = config["mqtt"].get("password") - topic_prefix = config["mqtt"]["topic_prefix"].strip("/") + topic_prefix = config["mqtt"]["topic_prefix"].rstrip("/") if user and password: client.username_pw_set(user, password) -- GitLab