diff --git a/CHANGELOG.md b/CHANGELOG.md index d7390f3..1e15c46 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ Changelog ========= +5.7.6 +----- + +- Fix crash when trying to output to CSV format + 5.7.5 ----- @@ -17,7 +22,7 @@ Changelog - BIMI images and mark certificates - Better error handling - Simplified warning messages - - `sha256_hash` output tfields renamed to `sha256` + - `sha256_hash` output fields renamed to `sha256` 5.7.2 ----- diff --git a/checkdmarc/__init__.py b/checkdmarc/__init__.py index 791cd7b..f71a42d 100644 --- a/checkdmarc/__init__.py +++ b/checkdmarc/__init__.py @@ -47,7 +47,7 @@ def check_domains( approved_nameservers: list[str] = None, approved_mx_hostnames: bool = None, skip_tls: bool = False, - bimi_selector: str = None, + bimi_selector: str = "default", include_tag_descriptions: bool = False, nameservers: list[str] = None, resolver: dns.resolver.Resolver = None, @@ -280,8 +280,13 @@ def results_to_csv_rows(results: Union[dict, list[dict]]) -> list[dict]: row["mta_sts_warnings"] = "|".join(_mta_sts["warnings"]) if "bimi" in result: _bimi = result["bimi"] - row["bimi_warnings"] = "|".join(_bimi["warnings"]) row["bimi_selector"] = _bimi["selector"] + bimi_error = None + if "error" in _bimi: + bimi_error = _bimi["error"] + row["bimi_error"] = bimi_error + + row["bimi_warnings"] = "|".join(_bimi["warnings"]) if "error" in _bimi: row["bimi_error"] = _bimi["error"] if "l" in _bimi["tags"]: @@ -418,6 +423,9 @@ def results_to_csv(results: dict) -> str: "ns", "ns_error", "ns_warnings", + "bimi_selector", + "bimi_error", + "bimi_warnings", "smtp_tls_reporting_error", "smtp_tls_reporting_warnings", ] diff --git a/checkdmarc/_constants.py b/checkdmarc/_constants.py index e1de336..f6f6e23 100644 --- a/checkdmarc/_constants.py +++ b/checkdmarc/_constants.py @@ -18,7 +18,7 @@ See the License for the specific language governing permissions and limitations under the License.""" -__version__ = "5.7.5" +__version__ = "5.7.6" OS = platform.system() OS_RELEASE = platform.release()