From d1750703ef5b009d82472f4912ed2e64c761bb3a Mon Sep 17 00:00:00 2001 From: s-pace Date: Thu, 3 Sep 2020 11:33:12 +0200 Subject: [PATCH] refactor: avoid superfluous conditionnal check --- scraper/src/strategies/default_strategy.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/scraper/src/strategies/default_strategy.py b/scraper/src/strategies/default_strategy.py index 83928ba5..8b9366ee 100644 --- a/scraper/src/strategies/default_strategy.py +++ b/scraper/src/strategies/default_strategy.py @@ -178,11 +178,8 @@ def get_records_from_dom(self, current_page_url=None): if name == "version": version = str(content) - # When version is a comma-separated tokens - if ',' in version: - record[name] = [token.strip() for token in version.split(",")] - else: - record[name] = version + # Handle version as comma-separated tokens + record[name] = [token.strip() for token in version.split(",")] if current_page_url is not None: # Add variables to the record