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
try:
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()
return True
except IOError:
return
except OSError:
return
def exists(self, contact):
if not contact: