Skip to content

Commit f8ea2a8

Browse files
fix: address Copilot review - use logging.error, quit(), and validate GRAPHML_FILE
1 parent 3631273 commit f8ea2a8

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

mkconcore.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,11 @@ def _resolve_concore_path():
107107
return SCRIPT_DIR
108108

109109
if len(sys.argv) < 4:
110-
print("Usage: python mkconcore.py <GRAPHML_FILE> <sourcedir> <outdir> [type]")
111-
print(" type must be posix (macos or ubuntu), windows, or docker")
112-
sys.exit(1)
110+
logging.error("Usage: python mkconcore.py <GRAPHML_FILE> <sourcedir> <outdir> [type]")
111+
logging.error(" type must be posix (macos or ubuntu), windows, or docker")
112+
quit()
113113

114-
GRAPHML_FILE = sys.argv[1]
114+
GRAPHML_FILE = safe_name(sys.argv[1], "GRAPHML file argument", allow_path=True)
115115
TRIMMED_LOGS = True
116116
CONCOREPATH = _resolve_concore_path()
117117
CPPWIN = "g++" #Windows C++ 6/22/21

0 commit comments

Comments
 (0)