From b32829fd362a3da7ea900e1b85fac58cadd7a63c Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Fri, 8 Mar 2024 02:57:46 -0500 Subject: [PATCH] fix errors when `dp` is executed without any subcommands Signed-off-by: Jinzhe Zeng --- deepmd/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deepmd/main.py b/deepmd/main.py index 870a04a088..09457419e8 100644 --- a/deepmd/main.py +++ b/deepmd/main.py @@ -798,7 +798,8 @@ def main(): ): deepmd_main = BACKENDS[args.backend]().entry_point_hook elif args.command is None: - pass + # help message has been printed in parse_args + return else: raise RuntimeError(f"unknown command {args.command}")