Backwards compatibility py2.6: replace etree iter
- Make python 2.6 compatible: replace iter() with findall()
This commit is contained in:
parent
1c68668eba
commit
e53afe3fb9
1 changed files with 2 additions and 2 deletions
|
@ -572,7 +572,7 @@ class PlexAPI():
|
|||
queue = Queue.Queue()
|
||||
threads = []
|
||||
|
||||
for Dir in xml.iter(tag='Device'):
|
||||
for Dir in xml.findall('Device'):
|
||||
if "server" in Dir.get('provides'):
|
||||
if Dir.find('Connection') is None:
|
||||
# no valid connection - skip
|
||||
|
@ -599,7 +599,7 @@ class PlexAPI():
|
|||
# If PMS seems (!!) local, try a local connection first
|
||||
# Backup to remote connection, if that failes
|
||||
PMS['baseURL'] = ''
|
||||
for Con in Dir.iter(tag='Connection'):
|
||||
for Con in Dir.findall('Connection'):
|
||||
localConn = Con.get('local')
|
||||
if ((PMS['local'] == '1' and localConn == '1') or
|
||||
(PMS['local'] == '0' and localConn == '0')):
|
||||
|
|
Loading…
Reference in a new issue