diff options
author | mathieui <mathieui@mathieui.net> | 2014-10-20 21:04:14 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2014-10-20 21:21:04 +0200 |
commit | f9734cde5623aaf701e222b00d5eebdf7a152772 (patch) | |
tree | 8f7b241df886d2c17eaee8f3630511631bf8cc3a /src/bookmark.py | |
parent | 7b01c62e07612a123f3ffe94583f51099e470c3b (diff) | |
download | poezio-f9734cde5623aaf701e222b00d5eebdf7a152772.tar.gz poezio-f9734cde5623aaf701e222b00d5eebdf7a152772.tar.bz2 poezio-f9734cde5623aaf701e222b00d5eebdf7a152772.tar.xz poezio-f9734cde5623aaf701e222b00d5eebdf7a152772.zip |
Remove the (sometimes wrong) default values in the config.get() calls
Diffstat (limited to 'src/bookmark.py')
-rw-r--r-- | src/bookmark.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/bookmark.py b/src/bookmark.py index 1807c45e..672fb4a5 100644 --- a/src/bookmark.py +++ b/src/bookmark.py @@ -23,7 +23,7 @@ def xml_iter(xml, tag=''): else: return xml.getiterator(tag) -preferred = config.get('use_bookmarks_method', 'pep').lower() +preferred = config.get('use_bookmarks_method').lower() if preferred not in ('pep', 'privatexml'): preferred = 'privatexml' not_preferred = 'privatexml' if preferred == 'pep' else 'privatexml' @@ -155,8 +155,8 @@ def save_local(): def save(xmpp, core=None): """Save all the bookmarks.""" save_local() - if config.get('use_remote_bookmarks', True): - preferred = config.get('use_bookmarks_method', 'privatexml') + if config.get('use_remote_bookmarks'): + preferred = config.get('use_bookmarks_method') if not save_remote(xmpp, method=preferred) and core: core.information('Could not save bookmarks.', 'Error') return False @@ -192,7 +192,7 @@ def get_remote(xmpp): """Add the remotely stored bookmarks to the list.""" if xmpp.anon: return - method = config.get('use_bookmarks_method', '') + method = config.get('use_bookmarks_method') if not method: pep, privatexml = True, True for method in methods[1:]: @@ -214,7 +214,7 @@ def get_remote(xmpp): def get_local(): """Add the locally stored bookmarks to the list.""" - rooms = config.get('rooms', '') + rooms = config.get('rooms') if not rooms: return rooms = rooms.split(':') |