Fix /export
This commit is contained in:
parent
099d1d1c2c
commit
b245ff6e2d
1 changed files with 4 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue