From e1c458dafe8162cd1f1ed5b066087a32e158fbce Mon Sep 17 00:00:00 2001 From: bobokun Date: Tue, 14 Dec 2021 19:12:29 -0500 Subject: [PATCH] better check for no urls --- modules/config.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/config.py b/modules/config.py index 7489cb98..54636a20 100644 --- a/modules/config.py +++ b/modules/config.py @@ -107,13 +107,14 @@ def get_tags(self,urls): tags['max_ratio'] = None tags['max_seeding_time'] = None tags['limit_upload_speed'] = None + if not urls: return tags try: tags['url'] = util.trunc_val(urls[0], '/') except IndexError as e: tags['url'] = None logger.debug(f"Tracker Url:{urls}") logger.debug(e) - if 'tags' in self.data and self.data["tags"] is not None and urls: + if 'tags' in self.data and self.data["tags"] is not None: tag_values = self.data['tags'] for tag_url, tag_details in tag_values.items(): for url in urls: