Merge pull request #1609 from pbiering/improve-1186

log content in case of multiple main components error
This commit is contained in:
Peter Bieringer
2024-10-29 07:24:12 +01:00
committed by GitHub
2 changed files with 3 additions and 1 deletions

View File

@@ -1,5 +1,7 @@
# Changelog # Changelog
* Enhancement: log content in case of multiple main components error
## 3.3.0 ## 3.3.0
* Adjustment: option [auth] htpasswd_encryption change default from "md5" to "autodetect" * Adjustment: option [auth] htpasswd_encryption change default from "md5" to "autodetect"

View File

@@ -279,7 +279,7 @@ def visit_time_ranges(vobject_item: vobject.base.Component, child_name: str,
yield comp, True, [] yield comp, True, []
else: else:
if main is not None: if main is not None:
raise ValueError("Multiple main components") raise ValueError("Multiple main components. Got comp: {}".format(comp))
main = comp main = comp
if main is None and len(recurrences) == 1: if main is None and len(recurrences) == 1:
main = rec_main main = rec_main