Commit 16b0278 1 parent a24832d commit 16b0278 Copy full SHA for 16b0278
File tree 1 file changed +7
-3
lines changed
opendcs-acquisition/config/sr3/plugins
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -332,12 +332,13 @@ def gather(self):
332
332
logger .error ( f"{ str (cmd ).replace (lsu .password ,'password' )} : failed" )
333
333
return []
334
334
335
- rof = open (rawObsFile ,'r ' )
335
+ rof = open (rawObsFile ,'rb ' )
336
336
FirstLine = False
337
337
bf = None
338
338
messages = []
339
339
RxTime = datetime .datetime .now (datetime .timezone .utc )
340
- for raw_line in rof .readlines ():
340
+ for byte_line in rof .readlines ():
341
+ raw_line = byte_line .decode ('unicode-escape' )
341
342
if raw_line .startswith ("TTAAii" ):
342
343
FirstLine = True
343
344
if bf :
@@ -373,7 +374,10 @@ def gather(self):
373
374
except Exception as ex :
374
375
logger .error ( "problem reading ob" , exc_info = True )
375
376
continue
376
- bf .write (raw_line )
377
+ for l in raw_line .split ('\\ n' ):
378
+ #l=l.replace('\\r','').replace('\\\\','\\').strip()+'\r\n'
379
+ l = l .replace ('\\ r' ,'' ).strip ()+ '\r \n '
380
+ bf .write (l )
377
381
378
382
if bf :
379
383
bf .close ()
You can’t perform that action at this time.
0 commit comments