openstack/horizon — pull request #5 by lzyeval (2011-12-14 12:25:40+00:00)
Title: add patch (bug898510)

https://bugs.launchpad.net/horizon/+bug/898510

files affected:
https://gist.github.com/1470104

detailed info:
https://gist.github.com/1470094

I did a hasattr check whenever the code tries to access the message attribute of a BaseException.

Since openstackx, glance, and quantum implements their exceptions with a message attribute, I thought keeping the message attribute access was logical.

I couldn't write the test code since evoking an exception on views and forms was impossible.

I could've made a duplicate module and import a fake api and raise the exception but that seemed too messy.

If you need unittests I'll have to look more into it.