Errors moved into their own namespace - Ref #1315

This commit is contained in:
erwanlr
2019-03-19 19:09:16 +00:00
parent 357e13be2b
commit f1657164d5
15 changed files with 85 additions and 73 deletions

View File

@@ -80,7 +80,7 @@ module WPScan
url = "#{remote_file_url(filename)}.sha512"
res = Browser.get(url, request_params)
raise DownloadError, res if res.timed_out? || res.code != 200
raise Error::Download, res if res.timed_out? || res.code != 200
res.body.chomp
end
@@ -121,7 +121,7 @@ module WPScan
file_url = remote_file_url(filename)
res = Browser.get(file_url, request_params)
raise DownloadError, res if res.timed_out? || res.code != 200
raise Error::Download, res if res.timed_out? || res.code != 200
File.open(file_path, 'wb') { |f| f.write(res.body) }