Skip to content
Snippets Groups Projects

fix issue where json would be printed to stdout even though outF is another file

Merged Ask Hjorth Larsen requested to merge fix-mainFunction-outF into master
1 file
+ 3
5
Compare changes
  • Side-by-side
  • Inline
@@ -936,9 +936,7 @@ class SimpleParser(object):
self.skipped = 0
self.superContext = superContext
self.annotateFile = None
global highlightmode
self.matchHighlighter = MatchHighlighter(highlightmode)
global annotate
if annotate:
annofilename=fIn.fIn.name + ".annotate"
logger.info("writing annotated input to " + annofilename)
@@ -960,9 +958,9 @@ class SimpleParser(object):
for s,gIndex in reversed(list(cNow.sections.items())):
self.backend.closeSection(s, gIndex)
cNow.startEnd = ParsingContext.End
True
return True
else:
False
return False
def contextPop(self):
cNow = self.context.pop()
@@ -1184,7 +1182,7 @@ def mainFunction(mainFileDescription,
# Initialize the backend where the final results are printed after they are
# possibly filtered by the caching ActiveBackend.
if superBackend is None:
jsonBackend = JsonParseEventsWriterBackend(metaInfoEnv, sys.stdout)
jsonBackend = JsonParseEventsWriterBackend(metaInfoEnv, outF)
else:
jsonBackend = superBackend
Loading