diff options
author | mathieui <mathieui@mathieui.net> | 2011-11-26 23:26:15 +0100 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2011-11-26 23:26:15 +0100 |
commit | 4ce8721c3d190d9193f31badbd16e772eafbb9c5 (patch) | |
tree | 08580c0c84d76bf400862bf2d7c33d51ab66a85b /src/bookmark.py | |
parent | 97aaeb1d1311c3ac53f03fceac51fb1cccbdcefc (diff) | |
download | poezio-4ce8721c3d190d9193f31badbd16e772eafbb9c5.tar.gz poezio-4ce8721c3d190d9193f31badbd16e772eafbb9c5.tar.bz2 poezio-4ce8721c3d190d9193f31badbd16e772eafbb9c5.tar.xz poezio-4ce8721c3d190d9193f31badbd16e772eafbb9c5.zip |
Default to privatexml instead of pep for bookmarks storage
(since private xml sadly has a better support)
Diffstat (limited to 'src/bookmark.py')
-rw-r--r-- | src/bookmark.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/bookmark.py b/src/bookmark.py index 019452eb..91078550 100644 --- a/src/bookmark.py +++ b/src/bookmark.py @@ -6,8 +6,8 @@ from config import config preferred = config.get('use_bookmarks_method', 'pep').lower() if preferred not in ('pep', 'privatexml'): - preferred = 'pep' -not_preferred = 'pep' if preferred is 'privatexml' else 'privatexml' + preferred = 'privatexml' +not_preferred = 'privatexml' if preferred is 'pep' else 'privatexml' methods = ('local', preferred, not_preferred) @@ -73,7 +73,6 @@ class Bookmark(object): return Bookmark(jid, name, autojoin, nick, password, method) - bookmarks = [] def get_by_jid(value): @@ -114,7 +113,7 @@ def save_remote(xmpp, core=None): method = config.get('use_bookmarks_method', '') if method not in ('pep', 'privatexml'): try: - save_pep(xmpp) + save_privatexml(xmpp) except: if core: core.information('Could not save bookmarks.', 'Error') @@ -177,6 +176,8 @@ def get_remote(xmpp): config.set_and_save('use_bookmarks_method', 'pep') elif privatexml and not pep: config.set_and_save('use_bookmarks_method', 'privatexml') + elif not pep and not privatexml: + config.set_and_save('use_bookmarks_method', '') def get_local(): rooms = config.get('rooms', '') |