]> granicus.if.org Git - graphviz/commitdiff
replace exit() with sys.exit() in Python files
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 24 Apr 2021 17:04:08 +0000 (10:04 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 1 May 2021 00:35:16 +0000 (17:35 -0700)
ci/generate-configuration-table.py
tests/regression_tests/shapes/shapes.py
tests/regression_tests/shapes/test_shapes.py
tests/regression_tests/vuln/vuln.py

index 00d2c0a494eeac3a9d9cf6ee63cc047590bfba54..74ac49b513f95622ae2cc0cfa26c8aa340f8e1a0 100755 (executable)
@@ -38,7 +38,7 @@ def main():
   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 = {
@@ -56,7 +56,7 @@ def main():
       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};"',
index 28405d4afe80f54bed1179a0d8d84731e97087ff..43cf8cd458ce611e1f51f40e64537651761a07a4 100644 (file)
@@ -89,7 +89,7 @@ def generate_shape_graph(shape, output_type):
 
   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>"
@@ -119,4 +119,4 @@ print(f"    Number of tests: {len(shapes) * len(output_types)}")
 print(f"    Number of failures: {failures}")
 
 if not failures == 0:
-  exit(1)
+  sys.exit(1)
index 734cdb3392cd628199348e9d97ccb3abe09038bd..9e235c880a2bf4a5b09e2780e268b17fe2326921 100644 (file)
@@ -91,7 +91,7 @@ def generate_shape_graph(shape, output_type):
 
   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>"
index e170afcebbc74a46e0e8c5618adce12ba64452c7..b8b5adde97190d2e0c6b2c94788d32cea7e6aa83 100644 (file)
@@ -24,7 +24,7 @@ def generate_vuln_graph(vulnfile, output_type):
 
   if process.wait() < 0:
     print(f"An error occurred while generating: {output_file}")
-    exit(1)
+    sys.exit(1)
 
 failures = 0
 for vulnfile in vulnfiles:
@@ -39,4 +39,4 @@ print(f"    Number of tests: {len(vulnfiles) * len(output_types)}")
 print(f"    Number of failures: {failures}")
 
 if not failures == 0:
-  exit(1)
+  sys.exit(1)