Skip to content

Commit

Permalink
Make sure we have a port number before int it.
Browse files Browse the repository at this point in the history
- Remove unused auth_location in s3_token along the way.
- Fixes bug 944720.

Change-Id: Ib6e48511d09798868c5ca3fa00472525bc9f8823
  • Loading branch information
chmouel committed Mar 8, 2012
1 parent 4e4f793 commit 94abc7e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
3 changes: 1 addition & 2 deletions keystone/middleware/auth_token.py
Expand Up @@ -129,8 +129,7 @@ def __init__(self, app, conf):

# where to find the auth service (we use this to validate tokens)
self.auth_host = conf.get('auth_host')
self.auth_port = int(conf.get('auth_port'))

self.auth_port = int(conf.get('auth_port', 35357))
auth_protocol = conf.get('auth_protocol', 'https')
if auth_protocol == 'http':
self.http_client_class = httplib.HTTPConnection
Expand Down
9 changes: 1 addition & 8 deletions keystone/middleware/s3_token.py
Expand Up @@ -45,16 +45,9 @@ def __init__(self, app, conf):

# where to find the auth service (we use this to validate tokens)
self.auth_host = conf.get('auth_host')
self.auth_port = int(conf.get('auth_port'))
self.auth_port = int(conf.get('auth_port', 35357))
self.auth_protocol = conf.get('auth_protocol', 'https')

# where to tell clients to find the auth service (default to url
# constructed based on endpoint we have for the service to use)
self.auth_location = conf.get('auth_uri',
'%s://%s:%s' % (self.auth_protocol,
self.auth_host,
self.auth_port))

# Credentials used to verify this component with the Auth service since
# validating tokens is a privileged call
self.admin_token = conf.get('admin_token')
Expand Down

0 comments on commit 94abc7e

Please sign in to comment.