Skip to content

The only downloader you need. 下载器的集大成者。

docs(cli): 说明 CommandParser 为何改为抛出异常

XiaoYouChR6488cef09e3e
diff --git a/app/cli.py b/app/cli.py
index fab8eb5d..1ef7462c 100644
--- a/app/cli.py
+++ b/app/cli.py
@@ -39,6 +39,8 @@ class TextRequested(Exception):
class CommandParser(ArgumentParser):
+ """argparse 的 sys.exit 会结束 Primary Instance,所以改为抛出异常。"""
+
def __init__(self, *args, **kwargs) -> None:
super().__init__(*args, allow_abbrev=False, **kwargs)