File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -152,8 +152,17 @@ def get_gd_platform():
152
152
fx_download_dir_url = f"https://archive.mozilla.org/pub/firefox/candidates/{ latest_beta_ver } -candidates/build{ build } /{ get_fx_platform ()} /{ language } /"
153
153
response = requests .get (fx_download_dir_url )
154
154
status = response .status_code
155
- if status < 300 :
156
- response_text = response .text
155
+ response_text = None
156
+ for _ in range (3 ):
157
+ if status < 300 :
158
+ response_text = response .text
159
+ else :
160
+ sleep (3 )
161
+ response = requests .get (fx_download_dir_url )
162
+ status = response .status_code
163
+
164
+ if response_text is None :
165
+ exit (f"Could not find build at { fx_download_dir_url } ." )
157
166
158
167
# Parse the HTML content
159
168
soup = BeautifulSoup (response_text , "html.parser" )
You can’t perform that action at this time.
0 commit comments