aboutsummaryrefslogtreecommitdiffstats
path: root/python/parse_emails.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/parse_emails.py')
-rw-r--r--python/parse_emails.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/python/parse_emails.py b/python/parse_emails.py
index e06c88af..aed45225 100644
--- a/python/parse_emails.py
+++ b/python/parse_emails.py
@@ -23,15 +23,15 @@ def makedf(r, indextype, ref):
masterdf = {}
for f in emails:
with f.open("rb") as fh:
- subject = next(fh)
- m = re.match("(?:Fwd:)?(\w{2})(\S+)\s", subject.decode('utf-8'))
+ subject = fh.readline()
+ m = re.match("(?:Fwd:)?(\w{2})([0-9]{1,2})\s", subject.decode('utf-8'))
if m:
indextype, series = m.groups()
series = int(series)
- if indextype=='HY' and series==24:
- print('{0}'.format(f))
else:
print("can't parse subject line for {0}".format(f))
+ print(subject.decode("utf-8"))
+ continue
flag = False
allexpiriesdf = {}
for line in fh: