diff options
author | Mathieu Pasquet <mathieui@mathieui.net> | 2013-09-16 13:08:28 +0200 |
---|---|---|
committer | Mathieu Pasquet <mathieui@mathieui.net> | 2013-09-16 13:08:28 +0200 |
commit | b245ff6e2da5eb56e9233ff5bac1d4855e64e949 (patch) | |
tree | 09805387d7ada441bd866d067db8c0790d306125 | |
parent | 099d1d1c2cf7e5ecfa4c43d9a12aa0d0cee761f3 (diff) | |
download | poezio-b245ff6e2da5eb56e9233ff5bac1d4855e64e949.tar.gz poezio-b245ff6e2da5eb56e9233ff5bac1d4855e64e949.tar.bz2 poezio-b245ff6e2da5eb56e9233ff5bac1d4855e64e949.tar.xz poezio-b245ff6e2da5eb56e9233ff5bac1d4855e64e949.zip |
Fix /export
-rw-r--r-- | src/roster.py | 5 |
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: |