summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lib/Server/Reports/reports/templatetags/bcfg2_tags.py6
-rw-r--r--src/lib/Server/Reports/reports/views.py8
2 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/Server/Reports/reports/templatetags/bcfg2_tags.py b/src/lib/Server/Reports/reports/templatetags/bcfg2_tags.py
index 7fffe289d..2d210cc07 100644
--- a/src/lib/Server/Reports/reports/templatetags/bcfg2_tags.py
+++ b/src/lib/Server/Reports/reports/templatetags/bcfg2_tags.py
@@ -219,9 +219,9 @@ def add_url_filter(parser, token):
filter_name = filter_name.strip()
filter_value = parser.compile_filter(filter_value)
except ValueError:
- raise template.TemplateSyntaxError, "%r tag requires exactly one argument" % token.contents.split()[0]
+ raise template.TemplateSyntaxError("%r tag requires exactly one argument" % token.contents.split()[0])
if not filter_name or not filter_value:
- raise template.TemplateSyntaxError, "argument should be a filter=value pair"
+ raise template.TemplateSyntaxError("argument should be a filter=value pair")
return AddUrlFilter(filter_name, filter_value)
@@ -268,7 +268,7 @@ def to_media_url(parser, token):
tag_name, filter_value = token.split_contents()
filter_value = parser.compile_filter(filter_value)
except ValueError:
- raise template.TemplateSyntaxError, "%r tag requires exactly one argument" % token.contents.split()[0]
+ raise template.TemplateSyntaxError("%r tag requires exactly one argument" % token.contents.split()[0])
return MediaTag(filter_value)
diff --git a/src/lib/Server/Reports/reports/views.py b/src/lib/Server/Reports/reports/views.py
index 3cffa68dd..463dec674 100644
--- a/src/lib/Server/Reports/reports/views.py
+++ b/src/lib/Server/Reports/reports/views.py
@@ -385,9 +385,9 @@ def prepare_paginated_list(request, context, paged_list, page=1, max_results=25)
Prepare context and slice an object for pagination.
"""
if max_results < 1:
- raise PaginationError, "Max results less then 1"
+ raise PaginationError("Max results less then 1")
if paged_list == None:
- raise PaginationError, "Invalid object"
+ raise PaginationError("Invalid object")
try:
nitems = paged_list.count()
@@ -404,8 +404,8 @@ def prepare_paginated_list(request, context, paged_list, page=1, max_results=25)
try:
view, args, kwargs = resolve(request.META['PATH_INFO'])
kwargs['page_number'] = total_pages
- raise PaginationError, HttpResponseRedirect(reverse(view,
- kwargs=kwargs))
+ raise PaginationError(HttpResponseRedirect(reverse(view,
+ kwards=kwargs)))
except (Resolver404, NoReverseMatch, ValueError):
raise "Accessing beyond last page. Unable to resolve redirect."