From 399e01b04c7e07018f38593530608ad8a2a472df Mon Sep 17 00:00:00 2001 From: Chris Coetzee Date: Fri, 9 Jun 2017 22:42:28 +0200 Subject: [PATCH] Make `saved_queries.py` printing python 3 compatible --- helpdesk/templatetags/saved_queries.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/helpdesk/templatetags/saved_queries.py b/helpdesk/templatetags/saved_queries.py index e3f9a954..7f9d0c4d 100644 --- a/helpdesk/templatetags/saved_queries.py +++ b/helpdesk/templatetags/saved_queries.py @@ -5,7 +5,7 @@ templatetags/saved_queries.py - This template tag returns previously saved queries. Therefore you don't need to modify any views. """ - +from __future__ import print_function from django.template import Library from django.db.models import Q from helpdesk.models import SavedSearch @@ -17,8 +17,9 @@ def saved_queries(user): return user_saved_queries except Exception as e: import sys - print >> sys.stderr, "'saved_queries' template tag (django-helpdesk) crashed with following error:" - print >> sys.stderr, e + print("'saved_queries' template tag (django-helpdesk) crashed with following error:", + file=sys.stderr) + print(e, file=sys.stderr) return '' register = Library()