Print usage information if no input file was specified (and no data is available from stdin)
This commit is contained in:
parent
57f93efc89
commit
c8eb29f54c
1 changed files with 3 additions and 0 deletions
|
|
@ -3301,6 +3301,9 @@ def parse_args(args=None, ignore_additional_args=False):
|
|||
infile = sys.stdin.buffer
|
||||
except AttributeError:
|
||||
infile = sys.stdin
|
||||
# the user probably does not want to manually enter SVG code into the terminal...
|
||||
if sys.stdin.isatty():
|
||||
_options_parser.error("No input file specified, see --help for detailed usage information")
|
||||
if options.outfilename:
|
||||
outfile = maybe_gziped_file(options.outfilename, "wb")
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue