summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Baumann <derflob@derflob.de>2015-09-07 16:08:06 +0200
committerFlorian Baumann <derflob@derflob.de>2015-09-07 16:08:06 +0200
commit520c7e61cfc855e8576fd386faaf533bac28b38b (patch)
tree51494f4d571aef9a40405a5a12e03004329e02ff
parent656207899ee1799b2eda36029c98d6014f39c2c8 (diff)
downloadxmpp-520c7e61cfc855e8576fd386faaf533bac28b38b.tar.gz
xmpp-520c7e61cfc855e8576fd386faaf533bac28b38b.tar.bz2
fix getting settings
-rw-r--r--__init__.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/__init__.py b/__init__.py
index 1b91a78..4157a0b 100644
--- a/__init__.py
+++ b/__init__.py
@@ -5,10 +5,9 @@ import octoprint.plugin
class OctoXMPP(octoprint.plugin.EventHandlerPlugin,
octoprint.plugin.SettingsPlugin):
-
def initialize(self):
- jid = self._settings.get("username")
- passwd = self._settings.get("password")
+ jid = self._settings.get(["username"])
+ passwd = self._settings.get(["password"])
self._xmpp = ClientXMPP(jid, passwd)
self._xmpp.add_event_handler("session_start", self._xmpp.send_presence)
@@ -20,7 +19,7 @@ class OctoXMPP(octoprint.plugin.EventHandlerPlugin,
return dict(jid="rupert@derflob.de", password="KosselMini", receivers=["derflob@derflob.de", "jabber@dermeb.de"])
def _msg_receivers(self, msg):
- for r in self._settings.get("receivers"):
+ for r in self._settings.get(["receivers"]):
self._xmpp.send_message(mto=r, mbody=msg)
def on_event(self, event, data):