Commit f2f911c9 authored by dkirov's avatar dkirov
Browse files

don't update roster, on each getRoster request

parent 661d0d65
......@@ -2,7 +2,7 @@
class Roster:
def __init__(self, zeroconf):
self._data = {}
self._data = None
self.zeroconf = zeroconf # our zeroconf instance
def update_roster(self):
......@@ -11,7 +11,9 @@ def update_roster(self):
def getRoster(self):
#print 'roster_zeroconf.py: getRoster'
self.update_roster()
if self._data is None:
self._data = {}
self.update_roster()
return self
def getDiffs(self):
......@@ -25,7 +27,7 @@ def getDiffs(self):
if self._data.has_key(key):
if old_data[key] != self._data[key]:
diffs[key] = self._data[key]['status']
#print 'roster_zeroconf.py: diffs:' + diffs
#print 'roster_zeroconf.py: diffs:' + str(diffs)
return diffs
def setItem(self, jid, name = '', groups = ''):
......
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