logger.info "Downloading #{url}"
if is_remote then
if logger.path.nil? or logger.path.empty? then
- ret = system "wget #{url} -O #{fullpath} -nv --tries=3"
+ ret = system "wget #{url} -O #{fullpath} -nv --tries=3 --connect-timeout=10"
else
- pid,status = Utils.execute_shell_with_log( "wget #{url} -O #{fullpath} -nv --tries=3", logger.path )
+ pid,status = Utils.execute_shell_with_log( "wget #{url} -O #{fullpath} -nv --tries=3 --connect-timeout=10", logger.path )
if not status.nil? then
ret = (status.exitstatus != 0) ? false : true
end
if ret then
logger.info "Downloaded #{filename}.. OK"
else
- logger.info "Failed to download #{filename}"
- logger.info " [dist: #{path}]"
+ logger.error "Failed to download #{filename}"
+ logger.error " [dist: #{path}]"
end
return ret
end