From ce80335a68fecc694f41e17c18294229348b563b Mon Sep 17 00:00:00 2001 From: Dirk Thomas Date: Wed, 1 Jul 2020 14:05:48 -0700 Subject: [PATCH] use dash instead of stdin as default (#158) --- vcstool/commands/import_.py | 2 +- vcstool/commands/validate.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vcstool/commands/import_.py b/vcstool/commands/import_.py index 6563c217..188b7217 100644 --- a/vcstool/commands/import_.py +++ b/vcstool/commands/import_.py @@ -47,7 +47,7 @@ def get_parser(): description='Import the list of repositories', prog='vcs import') group = parser.add_argument_group('"import" command parameters') group.add_argument( - '--input', type=file_or_url_type, default=sys.stdin, + '--input', type=file_or_url_type, default='-', help='Where to read YAML from', metavar='FILE_OR_URL') group.add_argument( '--force', action='store_true', default=False, diff --git a/vcstool/commands/validate.py b/vcstool/commands/validate.py index 8ea9ad56..8295257b 100644 --- a/vcstool/commands/validate.py +++ b/vcstool/commands/validate.py @@ -31,7 +31,7 @@ def get_parser(): description='Validate a repositories file', prog='vcs validate') group = parser.add_argument_group('"validate" command parameters') group.add_argument( - '--input', type=argparse.FileType('r'), default=sys.stdin) + '--input', type=argparse.FileType('r'), default='-') group.add_argument( '--retry', type=int, metavar='N', default=2, help='Retry commands requiring network access N times on failure')