Merge pull request #908 from croneter/fix-futurewarning

Fix FutureWarning
This commit is contained in:
croneter 2019-06-28 16:46:51 +02:00 committed by GitHub
commit 1bd29587e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -483,7 +483,7 @@ def extras(plex_id):
xbmcplugin.endOfDirectory(int(sys.argv[1])) xbmcplugin.endOfDirectory(int(sys.argv[1]))
return return
extras = API(xml[0]).extras() extras = API(xml[0]).extras()
if not extras: if extras is None:
return return
for child in xml: for child in xml:
xml.remove(child) xml.remove(child)

View file

@ -561,7 +561,7 @@ class Base(object):
Returns None if no extras are found Returns None if no extras are found
""" """
extras = self.xml.find('Extras') extras = self.xml.find('Extras')
if not extras: if extras is None:
return return
return (x for x in extras) return (x for x in extras)