Skip to content

Commit

Permalink
better check for no urls
Browse files Browse the repository at this point in the history
  • Loading branch information
bobokun committed Dec 15, 2021
1 parent 693e367 commit e1c458d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit e1c458d

Please sign in to comment.