mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-20 21:27:50 -06:00
Enhance error reporting for deleted files
The code now checks if a requested file is present in the files list before diagnosing issues and generating error reports for it. It will help prevent attempting to diagnose or report on files that do not exist or deleted, thus enhancing efficiency and preventing possible error generation CURA-10903
This commit is contained in:
parent
a965392559
commit
c6ff0d3030
2 changed files with 9 additions and 8 deletions
|
@ -51,15 +51,16 @@ def main() -> None:
|
|||
|
||||
if args.deleted:
|
||||
for file in args.Files:
|
||||
deletedFiles = diagnoseIssuesWithFile(file, settings )
|
||||
comments_check["Error Files"].extend([d.toDict() for d in deletedFiles])
|
||||
if file not in files:
|
||||
deletedFiles = diagnoseIssuesWithFile(file, settings)
|
||||
comments_check["Error Files"].extend([d.toDict() for d in deletedFiles])
|
||||
|
||||
results = yaml.dump(comments_check, default_flow_style=False, indent=4, width=240)
|
||||
results = yaml.dump(comments_check, default_flow_style=False, indent=4, width=240)
|
||||
|
||||
if report:
|
||||
report.write_text(results)
|
||||
else:
|
||||
print(results)
|
||||
if report:
|
||||
report.write_text(results)
|
||||
else:
|
||||
print(results)
|
||||
|
||||
if to_fix or to_diagnose:
|
||||
for file in files:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue