diff options
Diffstat (limited to 'src/bookmark.py')
-rw-r--r-- | src/bookmark.py | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/bookmark.py b/src/bookmark.py index 68e97aa6..7c519db2 100644 --- a/src/bookmark.py +++ b/src/bookmark.py @@ -11,7 +11,6 @@ bookmarks, both local and remote. import functools import logging -from sys import version_info from slixmpp.plugins.xep_0048 import Bookmarks, Conference, URL from common import safeJID @@ -19,12 +18,6 @@ from config import config log = logging.getLogger(__name__) -def xml_iter(xml, tag=''): - if version_info[1] >= 2: - return xml.iter(tag) - else: - return xml.getiterator(tag) - preferred = config.get('use_bookmarks_method').lower() if preferred not in ('pep', 'privatexml'): preferred = 'privatexml' @@ -101,10 +94,10 @@ class Bookmark(object): name = el.get('name') autojoin = True if el.get('autojoin', 'false').lower() in ('true', '1') else False nick = None - for n in xml_iter(el, 'nick'): + for n in xml.iter(el, 'nick'): nick = n.text password = None - for p in xml_iter(el, 'password'): + for p in xml.iter(el, 'password'): password = p.text return Bookmark(jid, name, autojoin, nick, password, method) |