Commit 6a35aaaf authored by Takhir Fakhrutdinov's avatar Takhir Fakhrutdinov

Загрузка метео

parent a5aafcff
......@@ -120,7 +120,7 @@ class meteoEopFile(meteoBaseFile):
:linenos:
:caption: get_device
"""
_cnv = lambda x: str(x) if not x else 'null'
_cnv = lambda x: str(x) if x!=None else 'null'
for d in data:
tm = self.round_time(datetime.fromisoformat(d['Date'])).replace()
if tm not in self.times:
......@@ -217,7 +217,7 @@ class eop2mFile(meteoBaseFile):
:linenos:
:caption: load_data
"""
_cnv = lambda x: str(x) if not x else 'null'
_cnv = lambda x: str(x) if x!=None else 'null'
logger.info('Загрузка файла...')
await super().load(fd,args)
......@@ -237,7 +237,7 @@ class eop2mFile(meteoBaseFile):
self.tbeg, self.tend = min(self.tbeg,tm), max(self.tend,tm)
d = r['data']
row = '{{{}}}'.format(','.join(map(_cnv,[d[k] for k in atypes.keys()])))
self.write(f,(tm,dev,row))
self.write(fo,(tm,dev,row))
self.fid = await self.getfid()
self.fileattr = dict(devs=list(devs))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment