mirror of https://github.com/openXC7/prjxray.git
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:
parent
132342f7a2
commit
6731005c1e
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue