@@ -60,12 +60,13 @@ def extract_version(checker_data, url):
6060
6161 return m .group (1 )
6262
63+
6364def is_same_version (checker_data , current_url , new_version ):
6465 """
6566 Check if the new application version is the same with the current one. If the version number could be extracted,
6667 those strings are compared with each other to be resilient against load-balanced urls pointing to the same file.
6768 """
68- if new_version is None or new_version .version is None :
69+ if new_version .version is None :
6970 # No pattern given or failed parsing the new version, so check only if the url is different
7071 return current_url == new_version .url
7172
@@ -77,6 +78,7 @@ def is_same_version(checker_data, current_url, new_version):
7778
7879 return current_version_string == new_version .version
7980
81+
8082class URLChecker (Checker ):
8183 PRIORITY = 99
8284 CHECKER_DATA_TYPE = "rotating-url"
@@ -154,7 +156,9 @@ async def check(self, external_data: ExternalBase):
154156 if not is_rotating :
155157 new_version = new_version ._replace (url = url ) # pylint: disable=no-member
156158
157- same_version = is_same_version (external_data .checker_data , external_data .current_version .url , new_version )
159+ same_version = is_same_version (
160+ external_data .checker_data , external_data .current_version .url , new_version
161+ )
158162 external_data .set_new_version (
159163 new_version ,
160164 is_update = is_rotating and not same_version ,
0 commit comments