From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 0448C6DE0C3B for ; Mon, 17 Sep 2018 05:50:11 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.011 X-Spam-Level: X-Spam-Status: No, score=-0.011 tagged_above=-999 required=5 tests=[AWL=0.099, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id obLlB_YT1xYM for ; Mon, 17 Sep 2018 05:50:10 -0700 (PDT) Received: from mail.mugenguild.com (mugenguild.com [5.135.189.5]) by arlo.cworth.org (Postfix) with ESMTPS id 53C036DE0BCA for ; Mon, 17 Sep 2018 05:50:10 -0700 (PDT) Received: from localhost (w0628.wlan.rz.tu-bs.de [134.169.202.120]) by mail.mugenguild.com (Postfix) with ESMTPSA id 5D7C25FA07; Mon, 17 Sep 2018 14:50:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=my.amazin.horse; s=mail; t=1537188608; bh=aJRWfoVmF3Zu1BO0IE+TuZ0Ks0C6Mp1lSSG9dbVdQEk=; h=From:To:Subject:Date:From; b=KwBFoV+kFJerr9swIwiiXEysarYA3CWDilfW5pfCG9Elt1t5BTuIJT5APFjEhVMS5 zwGnrRwMC47yQjpxlfvdVMQueOwcOLtWlt/vkrvSjIIIAIUwMZBhLM7a9FsOAEv8jP cbs/6sXeigLd1JdZwNY5KLIATMUba4LUiGkpLvfY= From: Vincent Breitmoser To: notmuch@notmuchmail.org Subject: [PATCH] python: fix unchecked None access in get_property Date: Mon, 17 Sep 2018 14:49:32 +0200 Message-Id: <20180917124932.16228-1-look@my.amazin.horse> X-Mailer: git-send-email 2.18.0 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2018 12:50:11 -0000 --- bindings/python/notmuch/message.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bindings/python/notmuch/message.py b/bindings/python/notmuch/message.py index d242097a..de0fb415 100644 --- a/bindings/python/notmuch/message.py +++ b/bindings/python/notmuch/message.py @@ -482,7 +482,7 @@ class Message(Python3StringMixIn): if status != 0: raise NotmuchError(status) - return value.value.decode('utf-8') + return value.value.decode('utf-8') if value is not None else None def get_properties(self, prop="", exact=False): """ Get the properties of the message, returning a generator of -- 2.18.0