mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2025-08-17 11:21:11 +02:00
UPDATED: print statements to be Python 3.x compatible
This commit is contained in:
@ -9,6 +9,7 @@ scripts/get_email.py - Designed to be run from cron, this script checks the
|
||||
helpdesk, creating tickets from the new messages (or
|
||||
adding to existing tickets if needed)
|
||||
"""
|
||||
from __future__ import print_function
|
||||
|
||||
import email
|
||||
import imaplib
|
||||
@ -83,7 +84,7 @@ def process_email(quiet=False):
|
||||
|
||||
def process_queue(q, quiet=False):
|
||||
if not quiet:
|
||||
print "Processing: %s" % q
|
||||
print("Processing: %s" % q)
|
||||
|
||||
if q.socks_proxy_type and q.socks_proxy_host and q.socks_proxy_port:
|
||||
try:
|
||||
@ -290,7 +291,7 @@ def ticket_from_message(message, queue, quiet):
|
||||
f.save()
|
||||
|
||||
if not quiet:
|
||||
print (" [%s-%s] %s" % (t.queue.slug, t.id, t.title,)).encode('ascii', 'replace')
|
||||
print((" [%s-%s] %s" % (t.queue.slug, t.id, t.title,)).encode('ascii', 'replace'))
|
||||
|
||||
for file in files:
|
||||
if file['content']:
|
||||
@ -305,7 +306,7 @@ def ticket_from_message(message, queue, quiet):
|
||||
a.file.save(filename, ContentFile(file['content']), save=False)
|
||||
a.save()
|
||||
if not quiet:
|
||||
print " - %s" % filename
|
||||
print(" - %s" % filename)
|
||||
|
||||
|
||||
context = safe_template_context(t)
|
||||
|
Reference in New Issue
Block a user