Skip to content

Commit

Permalink
Merge pull request #130 from NERSC/bugfix/129-disallow-argparse-abbre…
Browse files Browse the repository at this point in the history
…v-in-option-filtering

Disallow abbreviations in the argparse option validity filter
  • Loading branch information
danfulton authored Dec 13, 2024
2 parents 2e310e5 + 018bffc commit 624ac8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion podman_hpc/click_passthrough.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def filterValidOptions(options, subcmd, option_regex=None):
option_regex = re.compile(r"^\s*(?:(-\w), )?(--\w[\w\-]+)(?:\s(\w+))?")

# create a dummy parser and populate it with valid option flags
p = argparse.ArgumentParser(exit_on_error=False, add_help=False)
p = argparse.ArgumentParser(exit_on_error=False, allow_abbrev=False, add_help=False)
with os.popen(" ".join(subcmd)) as f:
for line in f:
opt = option_regex.match(line)
Expand Down

0 comments on commit 624ac8e

Please sign in to comment.