Fix /export

This commit is contained in:
Mathieu Pasquet 2013-09-16 13:08:28 +02:00
parent 099d1d1c2c
commit b245ff6e2d

View file

@ -243,11 +243,14 @@ class Roster(object):
return return
try: try:
f = open(path, 'w+', encoding='utf-8') f = open(path, 'w+', encoding='utf-8')
f.writelines([i + "\n" for i in self.contacts]) f.writelines([str(i) + "\n" for i in self.contacts if self[i] and (self[i].subscription == "both" or self[i].ask)])
f.close() f.close()
return True return True
except IOError: except IOError:
return return
except OSError:
return
def exists(self, contact): def exists(self, contact):
if not contact: if not contact: