AttributeError: 'NoneType' object has no attribute 'rstrip'

Bug #1061848 reported by Cody A.W. Somerville
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-novaclient
Fix Released
Undecided
stelford

Bug Description

If the optional keyword argument 'auth_url' is not supplied and 'auth_system' is not "keystone" (the optional keyword's default value) when instantiating the nova client then a traceback will be produced due to novaclient.client.HTTPClient.__init__ attempting to call the rstrip method on auth_url which obviously does not exist when auth_url is of the type None.

Traceback (most recent call last):
<snip>
  File "tests.py", line 113, in get_nova_client
    return novaclient.client.Client(version, username, password, tenant)
  File "/.../novaclient/client.py", line 473, in Client
    return client_class(*args, **kwargs)
  File "/.../novaclient/v1_1/client.py", line 111, in __init__
    http_log_debug=http_log_debug)
  File "/.../novaclient/client.py", line 98, in __init__
    self.auth_url = auth_url.rstrip('/')
AttributeError: 'NoneType' object has no attribute 'rstrip'

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-novaclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/14060

Changed in python-novaclient:
assignee: nobody → stelford (stef-ummon)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-novaclient (master)

Reviewed: https://review.openstack.org/14060
Committed: http://github.com/openstack/python-novaclient/commit/a9a66ae7a750e507a0dda4bc9b2f9f62b9cd98a2
Submitter: Jenkins
Branch: master

commit a9a66ae7a750e507a0dda4bc9b2f9f62b9cd98a2
Author: Stef T <email address hidden>
Date: Thu Oct 4 16:20:23 2012 -0400

    Raises Exception on improper Auth Configuration

    Addresses bug 1061848.

    Basically, this bug comes about from not properly
    setting up the auth_system for novaclient. In this
    case, an exception of EndPointNotFound is flung.

    Change-Id: I12533aefd9d0425dd83e2e4c63f4dd5ff6faae71

Changed in python-novaclient:
status: In Progress → Fix Committed
Changed in python-novaclient:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.