From e3a3e7e40e437aa638b23814f7b7cb3f5b7d8de2 Mon Sep 17 00:00:00 2001 From: "Penney, Emory J" Date: Sun, 5 Mar 2023 23:20:47 +0000 Subject: [PATCH] Fixes #12: Stray quote --- pyobihai/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyobihai/__init__.py b/pyobihai/__init__.py index 2f61faa..85f866d 100644 --- a/pyobihai/__init__.py +++ b/pyobihai/__init__.py @@ -87,7 +87,10 @@ def get_line_state(self): services[subtitle] = state for x in o.findall("./parameter[@name='LastCallerInfo']/value"): state = x.attrib.get('current') - services[subtitle + " Last Caller Info"] = state.strip("\' ") + services[subtitle + " Last Caller Info"] = state.replace( + "'", "" + ).strip() + except requests.exceptions.RequestException as e: _LOGGER.error(e) return services