swift cli fails when no management_url is available

Bug #1089188 reported by Jonathan Harker
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-swiftclient
New
Undecided
Unassigned

Bug Description

The swift cli raises an uncaught TypeError when there is no management_url available for the tenant.

$ swift list
No handlers could be found for logger "keystoneclient.client"
Traceback (most recent call last):
  File "/home/harkerj/local/bin/swift", line 5, in <module>
    pkg_resources.run_script('python-swiftclient==1.2.0.25.g7df9cad', 'swift')
  File "/home/harkerj/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/pkg_resources.py", line 499, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/home/harkerj/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/pkg_resources.py", line 1235, in run_script
    execfile(script_filename, namespace, namespace)
  File "/home/harkerj/local/lib/python2.7/site-packages/python_swiftclient-1.2.0.25.g7df9cad-py2.7.egg/EGG-INFO/scripts/swift", line 1192, in <module>
    error_queue)
  File "/home/harkerj/local/lib/python2.7/site-packages/python_swiftclient-1.2.0.25.g7df9cad-py2.7.egg/EGG-INFO/scripts/swift", line 538, in st_list
    conn.get_account(marker=marker, prefix=options.prefix)[1]
  File "/home/harkerj/local/lib/python2.7/site-packages/python_swiftclient-1.2.0.25.g7df9cad-py2.7.egg/swiftclient/client.py", line 1030, in get_account
    prefix=prefix, full_listing=full_listing)
  File "/home/harkerj/local/lib/python2.7/site-packages/python_swiftclient-1.2.0.25.g7df9cad-py2.7.egg/swiftclient/client.py", line 990, in _retry
    self.url, self.token = self.get_auth()
  File "/home/harkerj/local/lib/python2.7/site-packages/python_swiftclient-1.2.0.25.g7df9cad-py2.7.egg/swiftclient/client.py", line 978, in get_auth
    insecure=self.insecure)
  File "/home/harkerj/local/lib/python2.7/site-packages/python_swiftclient-1.2.0.25.g7df9cad-py2.7.egg/swiftclient/client.py", line 317, in get_auth
    insecure=insecure)
  File "/home/harkerj/local/lib/python2.7/site-packages/python_swiftclient-1.2.0.25.g7df9cad-py2.7.egg/swiftclient/client.py", line 251, in get_keystoneclient_2_0
    auth_url=auth_url, insecure=insecure)
  File "/home/harkerj/local/lib/python2.7/site-packages/python_keystoneclient-0.2.0.18.g095cdd1-py2.7.egg/keystoneclient/v2_0/client.py", line 135, in __init__
    self.authenticate()
  File "/home/harkerj/local/lib/python2.7/site-packages/python_keystoneclient-0.2.0.18.g095cdd1-py2.7.egg/keystoneclient/client.py", line 173, in authenticate
    self.process_token()
  File "/home/harkerj/local/lib/python2.7/site-packages/python_keystoneclient-0.2.0.18.g095cdd1-py2.7.egg/keystoneclient/v2_0/client.py", line 153, in process_token
    self.management_url = self.auth_ref.management_url[0]
TypeError: 'NoneType' object has no attribute '__getitem__'

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.