BaseException.message has been deprecated in nova/compute/manager.py

Bug #929101 reported by Johannes Erdfelt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Johannes Erdfelt

Bug Description

This warning can be seen when an instance fault is created from an exception.

2012-02-08 19:45:22,963 WARNING nova.utils [req-00b45022-d49a-4dde-8051-093b9c8a025f fake fake] /home/johannes/openstack/nova/trunk/nova/compute/manager.py:2184: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6

The fix is to use str(fault) instead of fault.message

Changed in nova:
assignee: nobody → Johannes Erdfelt (johannes.erdfelt)
Revision history for this message
Vish Ishaya (vishvananda) wrote :

even better... unicode(fault) ??

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

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

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

Reviewed: https://review.openstack.org/3927
Committed: http://github.com/openstack/nova/commit/f0da7946b30d85ca41a940a00df0726970e68c6b
Submitter: Jenkins
Branch: master

commit f0da7946b30d85ca41a940a00df0726970e68c6b
Author: Johannes Erdfelt <email address hidden>
Date: Wed Feb 8 21:12:56 2012 +0000

    Fix deprecated warning

    Fixes bug 929101

    The message attribute of exceptions is deprecated, use unicode() instead

    Change-Id: I81ecd96807d6ad2ac2bcf64edf35600c705e53aa

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → essex-4
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: essex-4 → 2012.1
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.