From 75d213db6372132ce711378847fd0fed05675925 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger <asterix@lagaule.org> Date: Mon, 11 Aug 2014 22:16:11 +0200 Subject: [PATCH] correctly detect when no name is provided for bookmarks --- src/config.py | 2 +- src/roster_window.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config.py b/src/config.py index 0c689d0563..92b25c2da9 100644 --- a/src/config.py +++ b/src/config.py @@ -3163,7 +3163,7 @@ class ManageBookmarksWindow: None, None, None, None]) for bookmark in gajim.connections[account].bookmarks: - if bookmark['name'] == '': + if not bookmark['name']: # No name was given for this bookmark. # Use the first part of JID instead... name = bookmark['jid'].split("@")[0] diff --git a/src/roster_window.py b/src/roster_window.py index c92460f29a..6fc7df9f8a 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -6168,7 +6168,7 @@ class RosterWindow: for bookmark in gajim.connections[account].bookmarks: name = bookmark['name'] - if bookmark['name'] == '': + if not name: # No name was given for this bookmark. # Use the first part of JID instead... name = bookmark['jid'].split("@")[0] -- GitLab