Skip to content

Commit

Permalink
fix: address attribute error properly for form
Browse files Browse the repository at this point in the history
  • Loading branch information
alandtse committed Feb 2, 2021
1 parent 613406e commit 11f59ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion teslajsonpy/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ def get_inputs(soup: BeautifulSoup, searchfield=None) -> Dict[str, str]:
form = soup.find("form", searchfield)
if not form:
form = soup.find("form")
if form.find_all("input"):
if form:
for field in form.find_all("input"):
try:
data[field["name"]] = ""
Expand Down

0 comments on commit 11f59ea

Please sign in to comment.