mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-25 02:50:08 +03:00
bug #341: raise exceptions instead of exiting in OpenNebula::Client
This commit is contained in:
parent
b7263201d7
commit
aff16e5051
@ -74,13 +74,11 @@ module OpenNebula
|
||||
elsif File.file?(ENV["HOME"]+"/.one/one_auth")
|
||||
one_secret=File.read(ENV["HOME"]+"/.one/one_auth")
|
||||
else
|
||||
puts "ONE_AUTH file not present"
|
||||
exit -1
|
||||
raise "ONE_AUTH file not present"
|
||||
end
|
||||
|
||||
if !one_secret.match(".+:.+")
|
||||
puts "Authorization file malformed"
|
||||
exit -1
|
||||
raise "Authorization file malformed"
|
||||
end
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user