Skip to content

Commit

Permalink
feat: make the file before writing the output,
Browse files Browse the repository at this point in the history
in case the output is not available
  • Loading branch information
jacobomiranda committed May 27, 2024
1 parent cf7551a commit f6757bf
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/lx/lxMain.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,11 +219,13 @@ def startMFQL(options={}, queries={}, parent=None):
if not options["resultFile"]:
print(strResult)
else:
with open(options["resultFile"], "w") as f:
f.write(strResult)
if parent:
parent.writeOutput(options["resultFile"], strResult)
else:
with open(options["resultFile"], "w") as f:
f.write(strResult)



else:
print("\n <Query returned no result.>\n")

Expand Down

0 comments on commit f6757bf

Please sign in to comment.