diff --git a/pyglance/glance/compare.py b/pyglance/glance/compare.py index 01669a602b34f4e9712772fbf8f3684cf619434d..db4400a35868f6e71a93e4a88e72c9867f0c9eee 100644 --- a/pyglance/glance/compare.py +++ b/pyglance/glance/compare.py @@ -1810,6 +1810,7 @@ def main(): "Please check that the files are named the same in both directories.") return 1 temp_offset = 0 + pad_to_digits = len(str(len(file_pairs))) # how many potential reports are we making? zero pad names to the same width to_return = 0 summary_report_info = { } # run each of the reports, putting them in inner temp dirs @@ -1818,7 +1819,7 @@ def main(): LOG.info("Generating comparison report for files: " + single_a_file + " " + single_b_file) if len(file_pairs) > 1 : file_name_temp = os.path.splitext(os.path.basename(single_a_file))[0] - out_dir_name = "report-" + str(temp_offset) + "-" + file_name_temp + out_dir_name = "report-" + str(temp_offset).zfill(pad_to_digits) + "-" + file_name_temp ops_copy[OPTIONS_OUTPUT_PATH_KEY] = os.path.join(ops_copy[OPTIONS_OUTPUT_PATH_KEY], out_dir_name) temp_offset += 1