Commit 48974ece authored by André's avatar André

Fix reset of location/tune pubsub

parent b70acbc1
......@@ -64,13 +64,11 @@ class Location(BaseModule):
def set_location(self, data):
item = Node('geoloc', {'xmlns': Namespace.LOCATION})
if data is None:
return
data = data._asdict()
for tag, value in data:
if value is not None:
item.addChild(tag, payload=value)
if data is not None:
data = data._asdict()
for tag, value in data:
if value is not None:
item.addChild(tag, payload=value)
jid = self._client.get_bound_jid().getBare()
self._client.get_module('PubSub').publish(
......
......@@ -64,13 +64,11 @@ class Tune(BaseModule):
def set_tune(self, data):
item = Node('tune', {'xmlns': Namespace.TUNE})
if data is None:
return
data = data._asdict()
for tag, value in data.items():
if value is not None:
item.addChild(tag, payload=value)
if data is not None:
data = data._asdict()
for tag, value in data.items():
if value is not None:
item.addChild(tag, payload=value)
jid = self._client.get_bound_jid().getBare()
self._client.get_module('PubSub').publish(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment