Skip to content

Commit

Permalink
Moved access to message attribute inside if message is not Not statem…
Browse files Browse the repository at this point in the history
…ent (#731)
  • Loading branch information
jthure authored Jun 16, 2020
1 parent 8a88057 commit b0a28f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion miio/miioprotocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ def send_handshake(self) -> Message:
:raises DeviceException: if the device could not be discovered."""
m = MiIOProtocol.discover(self.ip)
header = m.header.value
if m is not None:
header = m.header.value
self._device_id = header.device_id
self._device_ts = header.ts
self._discovered = True
Expand Down

0 comments on commit b0a28f0

Please sign in to comment.