Skip to content

Commit

Permalink
5.7.6
Browse files Browse the repository at this point in the history
- Fix crash when trying to output to CSV format
  • Loading branch information
seanthegeek committed Oct 31, 2024
1 parent a85c1f2 commit 6003713
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Changelog
=========

5.7.6
-----

- Fix crash when trying to output to CSV format

5.7.5
-----

Expand All @@ -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
-----
Expand Down
12 changes: 10 additions & 2 deletions checkdmarc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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"]:
Expand Down Expand Up @@ -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",
]
Expand Down
2 changes: 1 addition & 1 deletion checkdmarc/_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 6003713

Please sign in to comment.