Skip to content

Commit

Permalink
print exit code to std op for downstream use
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandip117 committed Sep 12, 2024
1 parent de7157e commit e1764d3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lld_chxr.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
logger.opt(colors = True)
logger.add(sys.stderr, format=logger_format)

__version__ = '1.1.0'
__version__ = '1.1.2'

DISPLAY_TITLE = r"""
_ _ _ _ _
Expand Down Expand Up @@ -108,7 +108,7 @@ def main(options: Namespace, inputdir: Path, outputdir: Path):
tagStruct = tagInfo_to_tagStruct(options)
mapper = PathMapper.file_mapper(inputdir, outputdir, glob=f"**/*{options.fileFilter}",fail_if_empty=False)
for input_file, output_file in mapper:
LOG(input_file)
LOG(f"Reading input file {input_file}")
filename = ntpath.basename(input_file)
jsonFilePath = os.path.join(options.outputdir, filename.replace(options.fileFilter,"status.json"))
with open(input_file) as f:
Expand All @@ -118,6 +118,8 @@ def main(options: Namespace, inputdir: Path, outputdir: Path):
LOG("Analysis check successful.")
files_dir = copytree(inputdir, outputdir,dirs_exist_ok=True,ignore=ignore_patterns('*.json'))
LOG(f"copying files to {files_dir} done.")
else:
LOG(f"QA check failed with exit code {status['exitCode']}")
# Open a json writer, and use the json.dumps()
# function to dump data
with open(jsonFilePath, 'w', encoding='utf-8') as jsonf:
Expand Down Expand Up @@ -202,7 +204,7 @@ def analyze_measurements(data, tagStruct, unit, diff):
status['exitCode'] = 3
status['flag'] = False
LOG(f"Allowed difference {diff}%, actual difference {difference}%")
#return status


return status

Expand Down

0 comments on commit e1764d3

Please sign in to comment.