Skip to content

Commit

Permalink
Added log message of skipped arg
Browse files Browse the repository at this point in the history
  • Loading branch information
idling-mind committed Nov 24, 2023
1 parent 320809b commit f40e33a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion html2dash/html2dash.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,12 @@ def parse_element(tag: element.Tag):
try:
return dash_element(**attrs)
except TypeError as e:
print(e)
match = re.search(r"received an unexpected keyword argument: `(.*)`", str(e))
attrs.pop(match.group(1))
logger.warning(
f"Removed the attribute '{match.group(1)}' from the element '{tag.name}'"
f" because it was not valid."
)



Expand Down

0 comments on commit f40e33a

Please sign in to comment.