summaryrefslogtreecommitdiff
path: root/src/bookmark.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2014-10-31 19:15:57 +0100
committermathieui <mathieui@mathieui.net>2014-10-31 19:16:44 +0100
commit1c1ab3cb839e5509db52770e10c7190f844eb2e5 (patch)
treeb331060b3dc42651e61e4ccb2dfe6af5e2e97752 /src/bookmark.py
parentcedc5a6ec80a46437f42464415fd1806049c593d (diff)
parentea2b703bfd07d293ba9fdd85ac657275d43da2a7 (diff)
downloadpoezio-1c1ab3cb839e5509db52770e10c7190f844eb2e5.tar.gz
poezio-1c1ab3cb839e5509db52770e10c7190f844eb2e5.tar.bz2
poezio-1c1ab3cb839e5509db52770e10c7190f844eb2e5.tar.xz
poezio-1c1ab3cb839e5509db52770e10c7190f844eb2e5.zip
Merge branch 'master' of git.poez.io:poezio into slix
Conflicts: src/bookmark.py src/config.py src/connection.py src/core/commands.py src/core/core.py src/core/handlers.py src/windows/info_bar.py src/windows/muc.py src/windows/roster_win.py src/windows/text_win.py src/xhtml.py
Diffstat (limited to 'src/bookmark.py')
-rw-r--r--src/bookmark.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/bookmark.py b/src/bookmark.py
index 6d271652..15a28c9d 100644
--- a/src/bookmark.py
+++ b/src/bookmark.py
@@ -25,7 +25,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 'pep'
@@ -159,8 +159,8 @@ def save(xmpp, core=None):
core.information('Could not save bookmarks.', 'Error')
elif core:
core.information('Bookmarks saved', 'Info')
- 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')
cb = functools.partial(_cb, core)
save_remote(xmpp, cb, method=preferred)
@@ -201,7 +201,7 @@ def get_remote(xmpp, callback):
"""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:
available_methods = {}
def _save_and_call_callback():
@@ -232,7 +232,7 @@ def save_bookmarks_method(available_methods):
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(':')
@@ -244,7 +244,7 @@ def get_local():
nick = jid.resource
else:
nick = None
- passwd = config.get_by_tabname('password', '', jid.bare, fallback=False) or None
+ passwd = config.get_by_tabname('password', jid.bare, fallback=False) or None
b = Bookmark(jid.bare, autojoin=True, nick=nick, password=passwd, method='local')
if not get_by_jid(b.jid):
bookmarks.append(b)