Skip to content

Commit

Permalink
suppress writing 0 length grouping_files
Browse files Browse the repository at this point in the history
  • Loading branch information
petersilva committed Apr 28, 2024
1 parent db77f76 commit 8e6b839
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions sarracenia/flowcb/filter/wmo00_write.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,12 @@ def after_accept(self,worklist):
output_file.close()
msg = sarracenia.Message.fromFileData(self.grouped_file, self.o, os.stat(self.grouped_file))

logger.info( f"WMO-00 grouping file {self.grouped_file} written {msg['size']} bytes, {record_no-1} records" )
worklist.incoming=[ msg ]
if msg['size'] > 0 :
logger.info( f"grouping file {self.grouped_file} written {msg['size']} bytes, {record_no-1} records" )
worklist.incoming=[ msg ]
else:
logger.error( f"empty grouping file being ignored and removed." )
os.unlink( self.grouped_file )



Expand Down

1 comment on commit 8e6b839

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage

Coverage Report •
FileStmtsMissCoverMissing
flowcb/filter
   wmo00_read.py88880%46–53, 55, 57, 59–64, 66, 68–69, 71–75, 77–79, 81–84, 86–93, 95–98, 101–102, 104–105, 110–112, 114, 116, 118, 120–122, 124–128, 130–132, 134–135, 137–138, 140–141, 143, 145, 147–148, 150, 152, 155–156, 158–161, 163–167, 169
   wmo00_write.py1121120%55–62, 65, 67, 69, 72–77, 79–81, 84–88, 90–91, 94, 96–98, 100, 102, 104–109, 111–112, 114, 116, 118–120, 122, 125, 127–128, 130–133, 135–143, 145–147, 150–152, 154, 156, 160–163, 165, 167, 169, 172, 174–175, 177, 179–180, 182, 186, 190–192, 194–196, 198, 200–207, 210–211, 213–215, 217–218, 222, 224–225, 227
TOTAL155721273118% 

Test Results

Tests Skipped Failures Errors Time
209 8 💤 0 ❌ 0 🔥 16.798s ⏱️

Please sign in to comment.