mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-12-27 09:08:53 +01:00
minor changes for python3
This commit is contained in:
parent
aae2501cab
commit
71504aa85d
@ -21,6 +21,7 @@ import logging
|
||||
logger = logging.getLogger('helpdesk')
|
||||
|
||||
from django.utils.encoding import smart_str
|
||||
from builtins import str as text
|
||||
|
||||
def send_templated_mail(template_name, email_context, recipients, sender=None, bcc=None, fail_silently=False, files=None):
|
||||
"""
|
||||
@ -118,7 +119,7 @@ def send_templated_mail(template_name, email_context, recipients, sender=None, b
|
||||
"subject": t.subject,
|
||||
}).render(context)
|
||||
|
||||
if isinstance(recipients,(str,unicode)):
|
||||
if isinstance(recipients, text):
|
||||
if recipients.find(','):
|
||||
recipients = recipients.split(',')
|
||||
elif type(recipients) != list:
|
||||
|
@ -29,7 +29,7 @@ class TestKBDisabled(TestCase):
|
||||
self.assertRaises(NoReverseMatch, reverse, 'helpdesk_kb_index')
|
||||
try:
|
||||
response = self.client.get(reverse('helpdesk_dashboard'))
|
||||
except NoReverseMatch, e:
|
||||
except NoReverseMatch as e:
|
||||
if 'helpdesk_kb_index' in e.message:
|
||||
self.fail("Please verify any unchecked references to helpdesk_kb_index (start with navigation.html)")
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user