Skip to content

Commit

Permalink
fix bug where length too short
Browse files Browse the repository at this point in the history
  • Loading branch information
Trystan Lea committed Feb 10, 2018
1 parent 22ff3f2 commit 5280090
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/interfacers/EmonHubTx3eInterfacer.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,9 @@ def read(self):
c.nodeid = int(self._settings['nodeoffset'])
c.realdata = f
else:
c.nodeid = int(f[0])
c.realdata = f[1:]
if len(f)>0:
c.nodeid = int(f[0])
c.realdata = f[1:]

return c

0 comments on commit 5280090

Please sign in to comment.