if opts.output_format.upper() not in supported_output_formats:
sys.stderr.write(f"Error: {opts.output_format} output format is not supported\n")
parser.print_help(file=sys.stderr)
- exit(1)
+ sys.exit(1)
if opts.colors == None:
styles = {
else:
sys.stderr.write(f"Error: {opts.colors} color specification is illegal\n")
parser.print_help(file=sys.stderr)
- exit(1)
+ sys.exit(1)
styles = {
"Yes": f' style="color: {yes_color};"',
"No": f' style="color: {no_color};"',
if process.wait() != 0:
print(f"An error occurred while generating: {output_file}")
- exit(1)
+ sys.exit(1)
if output_type == "svg":
# Remove the number in "Generated by graphviz version <number>"
print(f" Number of failures: {failures}")
if not failures == 0:
- exit(1)
+ sys.exit(1)