Skip to content

Commit

Permalink
fix crash on math ValueError
Browse files Browse the repository at this point in the history
  • Loading branch information
exking committed Apr 4, 2019
1 parent b130f97 commit c299a1d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lifx-poly.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ def long_update(self):
self.setDriver('GV7', 0)
try:
wifi_signal = math.floor(10 * math.log10(self.device.get_wifi_signal_mw()) + 0.5)
except (lifxlan.WorkflowException, OSError) as ex:
except (lifxlan.WorkflowException, OSError, ValueError) as ex:
LOGGER.error('Connection Error on getting {} bulb WiFi signal strength. This happens from time to time, normally safe to ignore. {}'.format(self.name, str(ex)))
else:
connected = 1
Expand Down
2 changes: 1 addition & 1 deletion server.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
{
"title": "polylifx: A Python library for LIFX",
"author": "James Milne (Einstein.42)",
"version": "2.1.15",
"version": "2.1.16",
"date": "November 8, 2017",
"source": "https://github.com/Einstein42/lifx-nodeserver",
"license": "https://github.com/Einstein42/lifx-nodeserver/blob/master/LICENSE"
Expand Down

0 comments on commit c299a1d

Please sign in to comment.