Corrected things from the merge.

This commit is contained in:
MalcolmMielle 2014-11-14 15:56:45 +01:00
parent 9fc7cca182
commit 91a7334a65

View File

@ -13,12 +13,12 @@ import time
#This is used to import library depending on the python version used. #This is used to import library depending on the python version used.
try: try:
#import urllib.request as urllib_request #for python 3 #for python 3
import json import json
except ImportError: except ImportError:
#import urllib2 as urllib_request # for python 2 # for python 2
import simplejson as json import simplejson as json
print('Error importing lib as pyhton3, switching to python 2 libraries') print('Error importing lib as python3, switching to python 2 libraries')
msg_ids = {} msg_ids = {}
@ -64,7 +64,8 @@ def send(url, user, password, msg, i=0):
def get_emails(imap_server, imap_user, imap_password, inbox, uid): def get_emails(imap_server, imap_user, imap_password, inbox, uid):
global msg_ids global msg_ids
print('Connecting to '+imap_server+'', end=' ')
print('Connecting to '+imap_server+'', end='')
conn = imaplib.IMAP4_SSL(imap_server) conn = imaplib.IMAP4_SSL(imap_server)
print('Connected') print('Connected')
to_send = [] to_send = []