Skip to content

Commit 92b9bbd

Browse files
committed
CMD: initialize exclude_files with the empty list
1 parent b605621 commit 92b9bbd

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

chc/cmdline/c_project/cprojectutil.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,9 @@ def cproject_analyze_project(args: argparse.Namespace) -> NoReturn:
429429
logfilemode: str = args.logfilemode
430430
excludefiles: List[str] = args.exclude
431431

432+
if excludefiles is None:
433+
excludefiles = []
434+
432435
if not os.path.isdir(tgtpath):
433436
print_error(f"Target directory {tgtpath} not found")
434437
exit(1)
@@ -451,7 +454,11 @@ def cproject_analyze_project(args: argparse.Namespace) -> NoReturn:
451454
exit(1)
452455

453456
capp = CApplication(
454-
projectpath, projectname, targetpath, contractpath, excludefiles=excludefiles)
457+
projectpath,
458+
projectname,
459+
targetpath,
460+
contractpath,
461+
excludefiles=excludefiles)
455462

456463
def save_xrefs(f: "CFile") -> None:
457464
capp.indexmanager.save_xrefs(
@@ -464,7 +471,11 @@ def save_xrefs(f: "CFile") -> None:
464471
linker.save_global_compinfos()
465472

466473
capp = CApplication(
467-
projectpath, projectname, targetpath, contractpath, excludefiles=excludefiles)
474+
projectpath,
475+
projectname,
476+
targetpath,
477+
contractpath,
478+
excludefiles=excludefiles)
468479

469480
am = AnalysisManager(capp, verbose=True)
470481

0 commit comments

Comments
 (0)