Skip to content

Commit

Permalink
Correct ignore option for show_duplicate_packages.py
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderRichert-NOAA committed Jun 27, 2023
1 parent af06c1f commit 19b776b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions util/show_duplicate_packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def show_duplicate_packages(txt_to_check, ignore_list=[], only_show_dups=False):
line = line.replace("^", "")
package_name = re.findall("\s\w{7}\s+(\^?[^\s@]+)@", line)
if not package_name: continue
if package_name[0] in ignore_list: continue
if [package_name[0]] in ignore_list: continue
line = " ".join(line.split()[1:])
dd[package_name[0]].add(line)
duplicates_found = False
Expand All @@ -46,8 +46,9 @@ def show_duplicate_packages(txt_to_check, ignore_list=[], only_show_dups=False):
parser = argparse.ArgumentParser(description="Check output of `spack concretize` for duplicate packages")
parser.add_argument("filename", nargs="?")
parser.add_argument("-d", action="store_true")
parser.add_argument("-i", nargs="*", default=[])
parser.add_argument("-i", nargs="*", action="append")
args = parser.parse_args()
print("AJWR", args.i)
if args.filename:
with open(args.filename, "r") as f:
txt_to_check = f.read()
Expand Down

0 comments on commit 19b776b

Please sign in to comment.