fasm2frames: default to sys.stdout instead of /dev/stdout

The fn_out argument defaulted to the literal path '/dev/stdout', which
does not exist on Windows, so running fasm2frames without an output
file (the common shell-redirect invocation) failed there. Default to
None and fall back to sys.stdout.
This commit is contained in:
Carlos Venegas Arrabé 2026-07-30 16:19:02 +02:00
parent 132342f7a2
commit 6731005c1e
No known key found for this signature in database
GPG Key ID: EC73A5348B584C4C
1 changed files with 3 additions and 3 deletions

View File

@ -296,16 +296,16 @@ def main():
parser.add_argument('fn_in', help='Input FPGA assembly (.fasm) file')
parser.add_argument(
'fn_out',
default='/dev/stdout',
default=None,
nargs='?',
help='Output FPGA frame (.frm) file')
help='Output FPGA frame (.frm) file (default: stdout)')
args = parser.parse_args()
run(
db_root=args.db_root,
part=args.part,
filename_in=args.fn_in,
f_out=open(args.fn_out, 'w'),
f_out=(open(args.fn_out, 'w') if args.fn_out else sys.stdout),
sparse=args.sparse,
roi=args.roi,
debug=args.debug,