Skip to content

Commit

Permalink
Update token.rb
Browse files Browse the repository at this point in the history
Trying to fix this error (fog#535) by changing the input to_s before trying to match it with the regex
  • Loading branch information
EdgeCaseLord authored Apr 10, 2024
1 parent be1d005 commit 21f9fd2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/fog/openstack/auth/token.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class StandardError < RuntimeError; end
class URLError < RuntimeError; end

def self.build(auth, options)
if auth[:openstack_identity_api_version] =~ /(v)*2(\.0)*/i ||
if auth[:openstack_identity_api_version].to_s =~ /(v)*2(\.0)*/i ||
auth[:openstack_tenant_id] || auth[:openstack_tenant]
Fog::OpenStack::Auth::Token::V2.new(auth, options)
else
Expand Down

0 comments on commit 21f9fd2

Please sign in to comment.