mirror of
https://github.com/puppetlabs/vmfloaty.git
synced 2026-01-26 05:28:40 -05:00
(#33) Raise TokenError if no token provided
This commit is contained in:
parent
8da1deaf6b
commit
579320e988
2 changed files with 10 additions and 2 deletions
|
|
@ -19,7 +19,7 @@ class Auth
|
|||
|
||||
def self.delete_token(verbose, url, user, password, token)
|
||||
if token.nil?
|
||||
STDERR.puts 'You did not provide a token'
|
||||
raise TokenError, 'You did not provide a token'
|
||||
end
|
||||
|
||||
conn = Http.get_conn_with_auth(verbose, url, user, password)
|
||||
|
|
@ -35,7 +35,7 @@ class Auth
|
|||
|
||||
def self.token_status(verbose, url, token)
|
||||
if token.nil?
|
||||
STDERR.puts 'You did not provide a token'
|
||||
raise TokenError, 'You did not provide a token'
|
||||
end
|
||||
|
||||
conn = Http.get_conn(verbose, url)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue