Exception tuples

Asked by Ekaterina Chernova

Hi!
I have a question about the openstack_dashboard exceptions.
https://github.com/openstack/horizon/blob/master/openstack_dashboard/exceptions.py

Why you guys store it in a tuple format and not in a list?
It will be easier to configure outer clients exceptions in horizon settings
Thanks in advance,
 Kate

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Dashboard (Horizon) Edit question
Assignee:
No assignee Edit question
Solved by:
Ekaterina Chernova
Solved:
Last query:
Last reply:
Revision history for this message
Lin Hua Cheng (lin-hua-cheng) said :
#1

issubclass is used for mapping horizon exception to the python-client excetion.

The argument classinfo in the method issubclass(class, classinfo) expects a tuple. http://docs.python.org/2/library/functions.html#issubclass

I think it was used since it was the straight-forward approach.

Revision history for this message
Ekaterina Chernova (efedorova) said :
#2

Ok, thank you