build/openfpgaloader: support args with '-'

many openfpgaloader args have a name with '-' as per normal convention.

This kwarg now works: file_type="raw"
This commit is contained in:
Andrew Dennison 2024-02-01 15:51:30 +11:00
parent afe7b93995
commit fc85fdd178
1 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,7 @@ class OpenFPGALoader(GenericProgrammer):
# Handle kwargs for specific, less common cases.
for key, value in kwargs.items():
cmd.append(f"--{key}")
cmd.append(f"--{key.replace('_', '-')}")
if value is not None:
cmd.append(str(value))