diff options
author | mathieui <mathieui@mathieui.net> | 2013-04-05 23:57:53 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2013-04-05 23:57:53 +0200 |
commit | 91b960b797bbf17f6c4b33279f2d406c5a2c93b2 (patch) | |
tree | 91cbb61f2618d448416f4a41043ef2327793a53b /src/roster.py | |
parent | 16268ba96460c0947be7208cba60ad95270a4da7 (diff) | |
download | poezio-91b960b797bbf17f6c4b33279f2d406c5a2c93b2.tar.gz poezio-91b960b797bbf17f6c4b33279f2d406c5a2c93b2.tar.bz2 poezio-91b960b797bbf17f6c4b33279f2d406c5a2c93b2.tar.xz poezio-91b960b797bbf17f6c4b33279f2d406c5a2c93b2.zip |
Handle I/O errors better
- Do not crash because of low disk space
- Notify the user whenever it happens
- A few functions now return a boolean instead of nothing
- Config.silent_set is Config.set_and_save without toggle and returning
strings. It is used whenever we don’t need set_and_save
- Config.set_and_save now returns a tuple (that can be passed directly
to core.information())
TODO: display the precise error to the user (instead of “unable to…”)
Diffstat (limited to 'src/roster.py')
-rw-r--r-- | src/roster.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/roster.py b/src/roster.py index 67e81da9..b0f3cf65 100644 --- a/src/roster.py +++ b/src/roster.py @@ -141,7 +141,7 @@ class Roster(object): folded_groups = ':'.join([group.name for group in self.groups.values()\ if group.folded]) log.debug('folded:%s\n' %folded_groups) - config.set_and_save('folded_roster_groups', folded_groups, 'var') + return config.silent_set('folded_roster_groups', folded_groups, 'var') def get_nb_connected_contacts(self): """ |