mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-25 01:13:31 +01:00
Remove unused variables, extract correct index
This commit is contained in:
parent
b326103d82
commit
1468982043
@ -177,13 +177,13 @@ def imap_sync(q, logger, server):
|
|||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
status, data = server.search(None, 'NOT', 'DELETED')
|
data = server.search(None, 'NOT', 'DELETED')[1]
|
||||||
if data:
|
if data:
|
||||||
msgnums = data[0].split()
|
msgnums = data[0].split()
|
||||||
logger.info("Received %d messages from IMAP server" % len(msgnums))
|
logger.info("Received %d messages from IMAP server" % len(msgnums))
|
||||||
for num in msgnums:
|
for num in msgnums:
|
||||||
logger.info("Processing message %s" % num)
|
logger.info("Processing message %s" % num)
|
||||||
status, data = server.fetch(num, '(RFC822)')
|
data = server.fetch(num, '(RFC822)')[1]
|
||||||
full_message = encoding.force_str(data[0][1], errors='replace')
|
full_message = encoding.force_str(data[0][1], errors='replace')
|
||||||
try:
|
try:
|
||||||
ticket = object_from_message(
|
ticket = object_from_message(
|
||||||
@ -346,7 +346,7 @@ def create_ticket_cc(ticket, cc_list):
|
|||||||
from helpdesk.views.staff import subscribe_to_ticket_updates, User
|
from helpdesk.views.staff import subscribe_to_ticket_updates, User
|
||||||
|
|
||||||
new_ticket_ccs = []
|
new_ticket_ccs = []
|
||||||
for cced_name, cced_email in cc_list:
|
for __, cced_email in cc_list:
|
||||||
|
|
||||||
cced_email = cced_email.strip()
|
cced_email = cced_email.strip()
|
||||||
if cced_email == ticket.queue.email_address:
|
if cced_email == ticket.queue.email_address:
|
||||||
|
Loading…
Reference in New Issue
Block a user