Skip to content

Commit 98d887b

Browse files
committed
Merge if-lines
1 parent f410fe8 commit 98d887b

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

plugwise/smile.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -383,14 +383,13 @@ async def connect(self) -> bool:
383383
models.append(model.text)
384384

385385
dsmrmain = result.find("./module/protocols/dsmrmain")
386-
if "Plugwise" not in names:
387-
if dsmrmain is None: # pragma: no cover
388-
LOGGER.error(
389-
"Connected but expected text not returned, we got %s. Please create \
390-
an issue on http://github.com/plugwise/python-plugwise",
391-
result,
392-
)
393-
raise ResponseError
386+
if "Plugwise" not in names and dsmrmain is None: # pragma: no cover
387+
LOGGER.error(
388+
"Connected but expected text not returned, we got %s. Please create \
389+
an issue on http://github.com/plugwise/python-plugwise",
390+
result,
391+
)
392+
raise ResponseError
394393

395394
# Check if Anna is connected to an Adam
396395
if "159.2" in models:

0 commit comments

Comments
 (0)