mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-31 10:41:08 +00:00
contrib: Avoid outputting binary data to TTY
This commit is contained in:
parent
a07bd8415d
commit
e7e51952dc
@ -131,6 +131,8 @@ def main():
|
||||
if args.subcommand is None:
|
||||
parser.print_help()
|
||||
elif args.subcommand == "encode":
|
||||
if args.outfile.isatty():
|
||||
sys.exit("Not much use in writing binary to a TTY. Please specify an output file or pipe output to another process.")
|
||||
state = load_file(args.infile)
|
||||
save_binary(args.outfile, state, fill=args.fill)
|
||||
elif args.subcommand == "decode":
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user