@@ -84,8 +84,8 @@ def preprocess(i):
84
84
85
85
extra_download_options = env .get ('MLC_DOWNLOAD_EXTRA_OPTIONS' , '' )
86
86
87
- verify_ssl = env .get ('MLC_VERIFY_SSL' , "True" )
88
- if is_false ( verify_ssl ) or os_info ['platform' ] == 'windows' :
87
+ verify_ssl = is_true ( env .get ('MLC_VERIFY_SSL' , "True" ) )
88
+ if not verify_ssl or os_info ['platform' ] == 'windows' :
89
89
verify_ssl = False
90
90
else :
91
91
verify_ssl = True
@@ -229,17 +229,17 @@ def preprocess(i):
229
229
rclone_copy_using = env .get ('MLC_RCLONE_COPY_USING' , 'sync' )
230
230
if rclone_copy_using == "sync" :
231
231
pre_clean = False
232
+ if not verify_ssl :
233
+ extra_download_options += " --no-check-certificate "
232
234
if env ["MLC_HOST_OS_TYPE" ] == "windows" :
233
235
# have to modify the variable from url to temp_url if it is
234
236
# going to be used anywhere after this point
235
237
url = url .replace ("%" , "%%" )
236
238
temp_download_file = env ['MLC_DOWNLOAD_FILENAME' ].replace (
237
239
"%" , "%%" )
238
- env ['MLC_DOWNLOAD_CMD' ] = f"rclone { rclone_copy_using } { q } { url } { q } { q } { os .path .join (os .getcwd (), temp_download_file )} { q } -P --error-on-no-transfer"
240
+ env ['MLC_DOWNLOAD_CMD' ] = f"rclone { rclone_copy_using } { q } { url } { q } { q } { os .path .join (os .getcwd (), temp_download_file )} { q } -P --error-on-no-transfer { extra_download_options } "
239
241
else :
240
242
env ['MLC_DOWNLOAD_CMD' ] = f"rclone { rclone_copy_using } { q } { url } { q } { q } { os .path .join (os .getcwd (), env ['MLC_DOWNLOAD_FILENAME' ])} { q } -P --error-on-no-transfer { extra_download_options } "
241
- if not verify_ssl :
242
- env ['MLC_DOWNLOAD_CMD' ] += f" --no-check-certificate"
243
243
244
244
filename = env ['MLC_DOWNLOAD_FILENAME' ]
245
245
env ['MLC_DOWNLOAD_DOWNLOADED_FILENAME' ] = filename
0 commit comments