summaryrefslogtreecommitdiff
path: root/src/roster.py
diff options
context:
space:
mode:
authorMathieu Pasquet <mathieui@mathieui.net>2013-09-16 13:08:28 +0200
committerMathieu Pasquet <mathieui@mathieui.net>2013-09-16 13:08:28 +0200
commitb245ff6e2da5eb56e9233ff5bac1d4855e64e949 (patch)
tree09805387d7ada441bd866d067db8c0790d306125 /src/roster.py
parent099d1d1c2cf7e5ecfa4c43d9a12aa0d0cee761f3 (diff)
downloadpoezio-b245ff6e2da5eb56e9233ff5bac1d4855e64e949.tar.gz
poezio-b245ff6e2da5eb56e9233ff5bac1d4855e64e949.tar.bz2
poezio-b245ff6e2da5eb56e9233ff5bac1d4855e64e949.tar.xz
poezio-b245ff6e2da5eb56e9233ff5bac1d4855e64e949.zip
Fix /export
Diffstat (limited to 'src/roster.py')
-rw-r--r--src/roster.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/roster.py b/src/roster.py
index 5a068909..fc68278f 100644
--- a/src/roster.py
+++ b/src/roster.py
@@ -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: