summaryrefslogtreecommitdiff
path: root/service/pixelated
diff options
context:
space:
mode:
authorPatrick Maia and Victor Shyba <pixelated-team+pmaia+vshyba@thoughtworks.com>2014-10-27 15:25:45 -0300
committerPatrick Maia and Victor Shyba <pixelated-team+pmaia+vshyba@thoughtworks.com>2014-10-27 15:25:45 -0300
commitde8a7b14014abc895b7a9c2e8de19bc5bbc3c818 (patch)
tree45412854c4259978ee4ac74e35187a9e50430308 /service/pixelated
parent3f7c5fd9a9506957b722a47f2fbdb7e587654823 (diff)
Card #30 - does no crash when a part does not have headers
Diffstat (limited to 'service/pixelated')
-rw-r--r--service/pixelated/adapter/soledad_querier.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/service/pixelated/adapter/soledad_querier.py b/service/pixelated/adapter/soledad_querier.py
index 2ccbcd72..4123c71d 100644
--- a/service/pixelated/adapter/soledad_querier.py
+++ b/service/pixelated/adapter/soledad_querier.py
@@ -123,7 +123,7 @@ class SoledadQuerier:
for part_key in hdoc['part_map'].keys():
self._extract_parts(hdoc['part_map'][part_key], parts)
else:
- headers_dict = {elem[0]: elem[1] for elem in hdoc['headers']}
+ headers_dict = {elem[0]: elem[1] for elem in hdoc.get('headers', [])}
if 'attachment' in headers_dict.get('Content-Disposition', ''):
parts['attachments'].append(self._extract_attachment(hdoc, headers_dict))
else: