diff options
author | mathieui <mathieui@mathieui.net> | 2014-12-20 23:32:56 +0100 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2014-12-20 23:32:56 +0100 |
commit | 3c195dd9ccef1adbb59ad8db7fcc7086fd01b667 (patch) | |
tree | f80f790330f87b98dcae066d45228f0f49306db4 /src/bookmark.py | |
parent | 2452706b909364178655c6c918a0348fb4298fb2 (diff) | |
download | poezio-3c195dd9ccef1adbb59ad8db7fcc7086fd01b667.tar.gz poezio-3c195dd9ccef1adbb59ad8db7fcc7086fd01b667.tar.bz2 poezio-3c195dd9ccef1adbb59ad8db7fcc7086fd01b667.tar.xz poezio-3c195dd9ccef1adbb59ad8db7fcc7086fd01b667.zip |
Remove the remaining pre-3.4 compatibility hacks
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) |