TypeError: 'NoneType' object does not support item assignment with latest os-client-config

Bug #1473921 reported by Javier Peña
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-openstackclient
Fix Released
Medium
Javier Peña

Bug Description

During tests with the current python-openstackclient master, we get the following error:

ERROR: openstackclient.shell Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/openstackclient/shell.py", line 152, in run
    return super(OpenStackShell, self).run(argv)
  File "/usr/lib/python2.7/site-packages/cliff/app.py", line 224, in run
    self.initialize_app(remainder)
  File "/usr/lib/python2.7/site-packages/openstackclient/shell.py", line 245, in initialize_app
    cloud_config.set_default('auth_type', 'osc_password')
  File "/usr/lib/python2.7/site-packages/os_client_config/config.py", line 67, in set_default
    defaults._defaults[key] = value
TypeError: 'NoneType' object does not support item assignment

This is apparently caused by commit 50f05448982b5fafd9d9a7783b639dd145090a0d to os-client-config, which
removed the default values in the _defaults dict. This makes any call to cloud_config.set_default() before initializing the dict
fail.

jiaxi (tjxiter)
Changed in python-openstackclient:
assignee: nobody → jiaxi (tjxiter)
Revision history for this message
Javier Peña (jpena-c) wrote :

I have proposed https://review.openstack.org/198788 with a fix.

Revision history for this message
jiaxi (tjxiter) wrote :

@Javier Peña (jpena-c) :
I'm sorry.Maybe you had better assige it to you after you reported it.

Changed in python-openstackclient:
assignee: jiaxi (tjxiter) → nobody
Javier Peña (jpena-c)
Changed in python-openstackclient:
assignee: nobody → Javier Peña (jpena-c)
Revision history for this message
David Shrewsbury (dshrews) wrote :

We've also added a fix to os-client-config: https://review.openstack.org/201607

Changed in python-openstackclient:
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-openstackclient (master)

Reviewed: https://review.openstack.org/198788
Committed: https://git.openstack.org/cgit/openstack/python-openstackclient/commit/?id=c5b43831606e0fd813e1f06b40950f8c85555953
Submitter: Jenkins
Branch: master

commit c5b43831606e0fd813e1f06b40950f8c85555953
Author: Javier Pena <email address hidden>
Date: Mon Jul 6 18:04:18 2015 +0200

    Fix the way auth_type default value is overriden

    Commit 50f05448982b5fafd9d9a7783b639dd145090a0d to os-client-config
    removed the default values in the _defaults dict. This makes any
    call to cloud_config.set_default() before initializing the dict
    fail.

    The fix changes the way the auth_type default is overriden, by
    doing it when cloud_config.OpenStackConfig() is executed.

    Change-Id: If37d3ba303f01d4c77fd7c15a3cde9634534b64a
    Closes-bug: #1473921

Changed in python-openstackclient:
status: In Progress → Fix Committed
Changed in python-openstackclient:
milestone: none → 1.6.0
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.