Ask Your Question
0

Exception tuples

asked 2013-10-10 09:04:40 -0500

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

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

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2013-10-11 07:58:42 -0500

Ok, thank you

edit flag offensive delete link more
0

answered 2013-10-11 07:13:21 -0500

lin-hua-cheng gravatar image

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 (http://docs.python.org/2/library/func...)

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

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2013-10-10 09:04:40 -0500

Seen: 25 times

Last updated: Oct 11 '13