From 11f59eaa398d70e1444151414cc5235ce68584d9 Mon Sep 17 00:00:00 2001 From: "Alan D. Tse" Date: Mon, 1 Feb 2021 20:53:54 -0800 Subject: [PATCH] fix: address attribute error properly for form --- teslajsonpy/connection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/teslajsonpy/connection.py b/teslajsonpy/connection.py index 837b69ae..f62485c5 100644 --- a/teslajsonpy/connection.py +++ b/teslajsonpy/connection.py @@ -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"]] = ""