OpenStack Compute (Nova)

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

Reported by Johannes Erdfelt on 2012-02-08
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
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)
Vish Ishaya (vishvananda) wrote :

even better... unicode(fault) ??

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

Changed in nova:
status: New → In Progress

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) on 2012-02-29
Changed in nova:
milestone: none → essex-4
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2012-04-05
Changed in nova:
milestone: essex-4 → 2012.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers