Skip to content

Commit

Permalink
OemGatewayListener: Accept decimal numbers.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jérôme Lafréchoux committed Jan 27, 2014
1 parent 4a0bd96 commit 049dd5f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions oemgatewaylistener.py
Expand Up @@ -44,8 +44,7 @@ def _process_frame(self, f):
f (string): 'NodeID val1 val2 ...'
This function splits the string into integers and checks their
validity.
This function splits the string into numbers and check its validity.
'NodeID val1 val2 ...' is the generic data format. If the source uses
a different format, override this method.
Expand All @@ -68,7 +67,7 @@ def _process_frame(self, f):
# Else, process frame
else:
try:
received = [int(val) for val in received]
received = [float(val) for val in received]
except Exception:
self._log.warning("Misformed RX frame: " + str(received))
else:
Expand Down Expand Up @@ -240,6 +239,7 @@ def _process_frame(self, f):
# Else, process frame
else:
try:
# Only integers are expected
received = [int(val) for val in received]
except Exception:
self._log.warning("Misformed RX frame: " + str(received))
Expand Down

0 comments on commit 049dd5f

Please sign in to comment.