summaryrefslogtreecommitdiff
path: root/horizon/tabs
diff options
context:
space:
mode:
authorEmma Steimann <emmasteimann@gmail.com>2012-03-04 00:35:21 -0600
committerGabriel Hurley <gabriel@strikeawe.com>2012-03-13 18:47:56 -0700
commit56d98e5fe28c4e9de4a77a78a63347d68c4e3142 (patch)
tree2160849c432917df45141f2fc41dbaa4149af623 /horizon/tabs
parentf7c0dd203dec019fe23203740d6859aa0643481c (diff)
downloadhorizon-56d98e5fe28c4e9de4a77a78a63347d68c4e3142.tar.gz
Created a new detail view for volumes (like instance details).
* fixes bug 944497 and fixes bug 953464. Change-Id: Idea17ab07f4fa46b72af6b54017899cbfe7e6ef0
Diffstat (limited to 'horizon/tabs')
-rw-r--r--horizon/tabs/base.py7
-rw-r--r--horizon/tabs/views.py4
2 files changed, 7 insertions, 4 deletions
diff --git a/horizon/tabs/base.py b/horizon/tabs/base.py
index 5d7be93f5..9da913a5c 100644
--- a/horizon/tabs/base.py
+++ b/horizon/tabs/base.py
@@ -14,6 +14,8 @@
# License for the specific language governing permissions and limitations
# under the License.
+import sys
+
from django.template import TemplateSyntaxError
from django.template.loader import render_to_string
from django.utils.datastructures import SortedDict
@@ -261,8 +263,9 @@ class Tab(html.HTMLElement):
return ''
try:
context = self.get_context_data(self.request)
- except Exception as exc:
- raise TemplateSyntaxError(exc)
+ except:
+ exc_type, exc_value, exc_traceback = sys.exc_info()
+ raise TemplateSyntaxError, exc_value, exc_traceback
return render_to_string(self.get_template_name(self.request), context)
def get_id(self):
diff --git a/horizon/tabs/views.py b/horizon/tabs/views.py
index dfe81bce0..ca80467e7 100644
--- a/horizon/tabs/views.py
+++ b/horizon/tabs/views.py
@@ -20,8 +20,8 @@ class TabView(generic.TemplateView):
def __init__(self):
if not self.tab_group_class:
- raise AttributeError("You must set the tab_group attribute on %s."
- % self.__class__.__name__)
+ raise AttributeError("You must set the tab_group_class attribute "
+ "on %s." % self.__class__.__name__)
def get_tabs(self, request, *args, **kwargs):
return self.tab_group_class(request, **kwargs)