From bd1b0cc533f45c0f6e4b0179b4450e7e5a28c873 Mon Sep 17 00:00:00 2001 From: croneter Date: Fri, 21 Dec 2018 15:18:19 +0100 Subject: [PATCH] Optimize code --- resources/lib/plex_functions.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/resources/lib/plex_functions.py b/resources/lib/plex_functions.py index 9a182131..4c66ec2d 100644 --- a/resources/lib/plex_functions.py +++ b/resources/lib/plex_functions.py @@ -602,9 +602,6 @@ class DownloadGen(object): def __iter__(self): return self - def next(self): - return self.__next__() - def __next__(self): while True: if len(self.xml): @@ -622,6 +619,8 @@ class DownloadGen(object): raise StopIteration LOG.debug('Waiting for download to finish') + next = __next__ + def get(self, key, default=None): return self.attrib.get(key, default)