(#33) Raise TokenError if no token provided

This commit is contained in:
Brian Cain 2016-09-24 11:14:02 -07:00
parent 8da1deaf6b
commit 579320e988
2 changed files with 10 additions and 2 deletions

View file

@ -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)