Browse Source

properly skip over ZoneInfo lines..

main
John-Mark Gurney 5 years ago
parent
commit
06e7e1ef6f
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      solardash/__init__.py

+ 3
- 0
solardash/__init__.py View File

@@ -99,6 +99,8 @@ class SolarDataWS(object):
try:
res = await anext(ei)
await ws.send_str('ng %.4f' % res.load)
except AttributeError:
continue
except concurrent.futures._base.CancelledError:
return

@@ -317,6 +319,7 @@ class Test(unittest.TestCase):

with open(os.path.join(self.tempdir, 'raineagle.0.log'), 'w', buffering=1) as fp:
fp.write('\t'.join([ 'm', '1578879268.23', '1578850464', 'Connected', '1.2740', '3.992000', 'kW', '85.575', '8.092', 'kWh' ]) + '\n')
loop.call_later(.01, fp.write, '\t'.join([ 'z', 'GMT+8', '1579767679', '1579796479', '-0800' ]) + '\n')
loop.call_later(.02, fp.write, '\t'.join([ 'm', '1578879269.23', '1578850465', 'Connected', '1.0000', '3.992000', 'kW', '85.575', '8.092', 'kWh' ]) + '\n')

# Test the websocket


Loading…
Cancel
Save