AttributeError if an email misses Content-Type header
Closed this issue · 0 comments
mapreri commented
If a email lacks of a Content-Type header an AttributionError exception is raised:
2014-11-05 23:23:19,578:ERROR:STDERR:Traceback (most recent call last):
2014-11-05 23:23:19,578:ERROR:STDERR: File "/home/mattia/devel/goopg/goopg/host/main", line 79, in <module>
2014-11-05 23:23:19,579:ERROR:STDERR:main()
2014-11-05 23:23:19,579:ERROR:STDERR: File "/home/mattia/devel/goopg/goopg/host/main", line 70, in main
2014-11-05 23:23:19,579:ERROR:STDERR:parse_and_send_result(command)
2014-11-05 23:23:19,580:ERROR:STDERR: File "/home/mattia/devel/goopg/goopg/host/main", line 65, in parse_and_send_result
2014-11-05 23:23:19,580:ERROR:STDERR:result = handler.parse(c)
2014-11-05 23:23:19,580:ERROR:STDERR: File "/home/mattia/devel/goopg/goopg/host/commandhandler.py", line 21, in parse
2014-11-05 23:23:19,580:ERROR:STDERR:result = self.verify(message)
2014-11-05 23:23:19,581:ERROR:STDERR: File "/home/mattia/devel/goopg/goopg/host/commandhandler.py", line 48, in verify
2014-11-05 23:23:19,581:ERROR:STDERR:check = content_type.find('multipart/signed') >= 0
2014-11-05 23:23:19,581:ERROR:STDERR:AttributeError
2014-11-05 23:23:19,581:ERROR:STDERR::
2014-11-05 23:23:19,581:ERROR:STDERR:'NoneType' object has no attribute 'find'
Following the entire email that generates it
Delivered-To: mapreri@gmail.com
Received: by 10.112.137.38 with SMTP id qf6csp680489lbb;
Wed, 5 Nov 2014 12:56:27 -0800 (PST)
X-Received: by 10.180.219.106 with SMTP id pn10mr8995357wic.63.1415220635134;
Wed, 05 Nov 2014 12:50:35 -0800 (PST)
Return-Path: <bounce-debian-vote=mattia=mapreri.org@lists.debian.org>
Received: from kahlan.mapreri.org (kahlan.mapreri.org. [95.85.2.163])
by mx.google.com with ESMTPS id r8si6927347wiy.73.2014.11.05.12.50.34
for <mapreri@gmail.com>
(version=TLSv1.2 cipher=RC4-SHA bits=128/128);
Wed, 05 Nov 2014 12:50:35 -0800 (PST)
Received-SPF: neutral (google.com: 95.85.2.163 is neither permitted nor denied by manual fallback record for domain of bounce-debian-vote=mattia=mapreri.org@lists.debian.org) client-ip=95.85.2.163;
Authentication-Results: mx.google.com;
spf=neutral (google.com: 95.85.2.163 is neither permitted nor denied by manual fallback record for domain of bounce-debian-vote=mattia=mapreri.org@lists.debian.org) smtp.mail=bounce-debian-vote=mattia=mapreri.org@lists.debian.org
Received: from bendel.debian.org ([82.195.75.100])
by kahlan.mapreri.org with esmtp (Exim 4.80)
(envelope-from <bounce-debian-vote=mattia=mapreri.org@lists.debian.org>)
id 1Xm7XG-0006vT-Bv
for mattia@mapreri.org; Wed, 05 Nov 2014 20:50:34 +0000
Received: from localhost (localhost [127.0.0.1])
by bendel.debian.org (Postfix) with QMQP
id 2D0CC3EC; Wed, 5 Nov 2014 20:50:31 +0000 (UTC)
Old-Return-Path: <robomod@news.nic.it>
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on bendel.debian.org
X-Spam-Level:
X-Spam-Status: No, score=-5.0 required=4.0 tests=LDO_WHITELIST
autolearn=unavailable version=3.3.2
X-Original-To: lists-debian-vote@bendel.debian.org
Delivered-To: lists-debian-vote@bendel.debian.org
Received: from localhost (localhost [127.0.0.1])
by bendel.debian.org (Postfix) with ESMTP id 26B6D3D4
for <lists-debian-vote@bendel.debian.org>; Wed, 5 Nov 2014 20:50:22 +0000 (UTC)
X-Virus-Scanned: at lists.debian.org with policy bank en-lt
X-Amavis-Spam-Status: No, score=-7 tagged_above=-10000 required=5.3
tests=[BAYES_00=-2, LDO_WHITELIST=-5] autolearn=ham
Received: from bendel.debian.org ([127.0.0.1])
by localhost (lists.debian.org [127.0.0.1]) (amavisd-new, port 2525)
with ESMTP id x1sd55Am1_MG for <lists-debian-vote@bendel.debian.org>;
Wed, 5 Nov 2014 20:50:19 +0000 (UTC)
X-policyd-weight: using cached result; rate: -8.1
Received: from erode.bofh.it (erode.bofh.it [IPv6:2001:4b78:2000::2])
by bendel.debian.org (Postfix) with ESMTP id E2BF777
for <debian-vote@lists.debian.org>; Wed, 5 Nov 2014 20:50:06 +0000 (UTC)
Received: from erode.bofh.it (localhost [127.0.0.1])
by erode.bofh.it (Postfix) with ESMTP id AAF673A61C6
for <debian-vote@lists.debian.org>; Wed, 5 Nov 2014 21:50:03 +0100 (CET)
From: Marco d'Itri <md@Linux.IT>
Subject: Re: Re-Proposal - preserve freedom of choice of init systems
Date: Wed, 5 Nov 2014 20:44:57 +0000 (UTC)
Message-ID: <m3e287$oq9$1@posted-at.bofh.it>
References: <a27760f39d54aa2c2ecf0ab2144b2a02@riseup.net>
To: debian-vote@lists.debian.org
Organization: bofh.it network services
NNTP-Posting-Host: localhost
X-Trace: erode.bofh.it 1415220297 25417 ::1 (5 Nov 2014 20:44:57 GMT)
X-Complaints-To: abuse@bofh.it
User-Agent: tin/2.1.1-20120623 ("Mulindry") (UNIX) (Linux/2.6.32-29-pve (x86_64))
Sender: robomod@news.nic.it
X-Original-Newsgroups: linux.debian.vote
X-Original-References: <ojfx0-6vm-13@gated-at.bofh.it>
X-Rc-Virus: 2007-09-13_01
X-Rc-Spam: 2008-11-04_01
Resent-Message-ID: <XRzKwKR71hL.A.H_H.X2oWUB@bendel>
Resent-From: debian-vote@lists.debian.org
X-Mailing-List: <debian-vote@lists.debian.org> archive/latest/20027
X-Loop: debian-vote@lists.debian.org
List-Id: <debian-vote.lists.debian.org>
List-URL: <http://lists.debian.org/debian-vote/>
List-Post: <mailto:debian-vote@lists.debian.org>
List-Help: <mailto:debian-vote-request@lists.debian.org?subject=help>
List-Subscribe: <mailto:debian-vote-request@lists.debian.org?subject=subscribe>
List-Unsubscribe: <mailto:debian-vote-request@lists.debian.org?subject=unsubscribe>
Precedence: list
Resent-Sender: debian-vote-request@lists.debian.org
Resent-Date: Wed, 5 Nov 2014 20:50:31 +0000 (UTC)
golinux@riseup.net wrote:
>I came to Linux for FREEDOM and for configurability. Finally, I could
http://islinuxaboutchoice.com/
Thank you for your contribute. Next!
--
ciao,
Marco
--
To UNSUBSCRIBE, email to debian-vote-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: https://lists.debian.org/m3e287$oq9$1@posted-at.bofh.it