Skip to content

Commit 15c7371

Browse files
committed
Print the help message when no arguments are provided
1 parent 147a5b3 commit 15c7371

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

requake/config/parse_arguments.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -450,12 +450,8 @@ def parse_arguments(progname='requake'):
450450
argcomplete.autocomplete(parser)
451451
args = parser.parse_args()
452452
if args.action is None:
453-
parser.print_usage(sys.stderr)
454-
sys.stderr.write(
455-
f'{progname}: '
456-
'error: at least one positional argument is required\n'
457-
)
458-
sys.exit(2)
453+
parser.print_help()
454+
sys.exit(0)
459455
# Additional code for "longerthan" and "shorterthan" options
460456
try:
461457
args.longerthan = _timespec_to_sec(args.longerthan)

0 commit comments

Comments
 (0)