diff --git a/src/mailparser/mailparser.py b/src/mailparser/mailparser.py index 96dc756..a598c2a 100644 --- a/src/mailparser/mailparser.py +++ b/src/mailparser/mailparser.py @@ -295,7 +295,8 @@ def _make_mail(self, complete=True): for i in keys: log.debug("Getting header or part {!r}".format(i)) - if value := getattr(self, i): + value = getattr(self, i) + if value: mail[i] = value # add defects