From 9a5239ab1d550a497bb85c0da2ec4ae963302a7d Mon Sep 17 00:00:00 2001 From: croneter Date: Fri, 21 Dec 2018 15:37:16 +0100 Subject: [PATCH] Optimize code --- resources/lib/plex_functions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/lib/plex_functions.py b/resources/lib/plex_functions.py index 4c66ec2d..71eda92d 100644 --- a/resources/lib/plex_functions.py +++ b/resources/lib/plex_functions.py @@ -615,8 +615,8 @@ class DownloadGen(object): start=self.current + (self.cache_factor - 1) * CONTAINERSIZE) return child app.APP.monitor.waitForAbort(0.1) - if not len(self.pending_counter) and not len(self.xml): - raise StopIteration + if not self.pending_counter and not len(self.xml): + raise StopIteration() LOG.debug('Waiting for download to finish') next = __next__