You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by hu...@apache.org on 2020/09/06 12:12:08 UTC

[incubator-ponymail-foal] 02/02: This var is unused outside of this scope.

This is an automated email from the ASF dual-hosted git repository.

humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git

commit f57702eecab09e4cb2a08b83b8416ee4371c40fe
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Sun Sep 6 14:11:56 2020 +0200

    This var is unused outside of this scope.
    
    Doesn't seem to be needed, as character_set is just as good a test
---
 tools/archiver.py | 2 --
 1 file changed, 2 deletions(-)

diff --git a/tools/archiver.py b/tools/archiver.py
index 8148e54..c92d3c5 100755
--- a/tools/archiver.py
+++ b/tools/archiver.py
@@ -177,7 +177,6 @@ class Body:
                 parent_charset
             )  # Parent charset as fallback if any/different
         self.character_set = None
-        self.has_charset = False
         self.string: typing.Optional[str] = None
         self.flowed = "format=flowed" in part.get("content-type", "")
         self.bytes = part.get_payload(decode=True)
@@ -189,7 +188,6 @@ class Body:
                     try:
                         self.string = self.bytes.decode(cs)
                         self.character_set = str(cs)
-                        self.has_charset = True
                         break
                     except UnicodeDecodeError:
                         pass