Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 111d1542 authored by BERARD Benjamin's avatar BERARD Benjamin
Browse files

Merge branch 'deprecated_open' into 'master'

[refrepo] Fix deprecated Kernel#Open and add information about 401 error

See merge request !289
parents 449c1d23 f79352ca
Branches
No related tags found
1 merge request!289[refrepo] Fix deprecated Kernel#Open and add information about 401 error
Pipeline #356709 passed
...@@ -13,8 +13,9 @@ module RefRepo::Utils ...@@ -13,8 +13,9 @@ module RefRepo::Utils
o = { :http_basic_authentication => [conf['username'], conf['password']] } o = { :http_basic_authentication => [conf['username'], conf['password']] }
else else
o = {} o = {}
puts "Check the documentation https://www.grid5000.fr/w/TechTeam:Reference_Repository#Credentials and your ~/.grid5000_api.yml file"
end end
d = open("#{conf['uri']}/#{conf['version']}/#{path}", o).read d = URI.open("#{conf['uri']}/#{conf['version']}/#{path}", o).read
return JSON::parse(d) return JSON::parse(d)
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment