aboutsummaryrefslogtreecommitdiffstats
path: root/python/download_emails.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/download_emails.py')
-rw-r--r--python/download_emails.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/python/download_emails.py b/python/download_emails.py
index cf4e8a18..1d0c54c8 100644
--- a/python/download_emails.py
+++ b/python/download_emails.py
@@ -13,6 +13,7 @@ import base64
import binascii
from send_email import get_gmail_service
import argparse
+import logging
SCOPES = 'https://www.googleapis.com/auth/gmail.readonly'
CLIENT_SECRET_FILE = 'secret.json'
@@ -93,7 +94,7 @@ def update_emails():
try:
subject, content, date = msg_content(get_msg(service, 'me', msg['id']))
except (binascii.Error, KeyError, UnicodeDecodeError) as e:
- print("error decoding {0}".format(msg['id']))
+ logging.error("error decoding " + msg['id'])
continue
else:
email = p / msg['id']