@@ -60,12 +60,13 @@ def extract_version(checker_data, url):
60
60
61
61
return m .group (1 )
62
62
63
+
63
64
def is_same_version (checker_data , current_url , new_version ):
64
65
"""
65
66
Check if the new application version is the same with the current one. If the version number could be extracted,
66
67
those strings are compared with each other to be resilient against load-balanced urls pointing to the same file.
67
68
"""
68
- if new_version is None or new_version .version is None :
69
+ if new_version .version is None :
69
70
# No pattern given or failed parsing the new version, so check only if the url is different
70
71
return current_url == new_version .url
71
72
@@ -77,6 +78,7 @@ def is_same_version(checker_data, current_url, new_version):
77
78
78
79
return current_version_string == new_version .version
79
80
81
+
80
82
class URLChecker (Checker ):
81
83
PRIORITY = 99
82
84
CHECKER_DATA_TYPE = "rotating-url"
@@ -154,7 +156,9 @@ async def check(self, external_data: ExternalBase):
154
156
if not is_rotating :
155
157
new_version = new_version ._replace (url = url ) # pylint: disable=no-member
156
158
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
+ )
158
162
external_data .set_new_version (
159
163
new_version ,
160
164
is_update = is_rotating and not same_version ,
0 commit comments