From b245ff6e2da5eb56e9233ff5bac1d4855e64e949 Mon Sep 17 00:00:00 2001 From: Mathieu Pasquet Date: Mon, 16 Sep 2013 13:08:28 +0200 Subject: Fix /export --- src/roster.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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: -- cgit v1.2.3