diff --git a/diceware.py b/diceware.py index 81cc318bbe5e4b164927c5fcdb5f46df381b2a4c..0ca1443c0dc195ab1c634b244b80e9713c8cd7fa 100644 --- a/diceware.py +++ b/diceware.py @@ -38,7 +38,7 @@ def handle_options(args): parser.add_argument( 'infile', nargs='?', metavar='INFILE', default=None, type=argparse.FileType('r'), - help="Input wordlist", + help="Input wordlist. `-' will read from stdin.", ) parser.set_defaults(capitalize=True) args = parser.parse_args(args) diff --git a/tests/test_diceware.py b/tests/test_diceware.py index cbd25f7341a60efa60ef623d7945dbce9e366ecf..22bda76fc2210a740d0ee395731cc67d03d3990c 100644 --- a/tests/test_diceware.py +++ b/tests/test_diceware.py @@ -144,7 +144,7 @@ class TestDicewareModule(object): # we can give an infile with open('mywords', 'w') as fd: fd.write('one\ntwo\n') - options = handle_options(['mywords',]) + options = handle_options(['mywords', ]) assert options.infile is not None assert options.infile.read() == 'one\ntwo\n' @@ -171,7 +171,7 @@ class TestDicewareModule(object): 'Create a passphrase\n' '\n' 'positional arguments:\n' - ' INFILE Input wordlist\n' + " INFILE Input wordlist. `-' will read from stdin.\n" '\n' 'optional arguments:\n' ' -h, --help show this help message and exit\n'