diff --git a/hermes/switch_conf.py b/hermes/switch_conf.py index fe36ffd..6cafc2e 100755 --- a/hermes/switch_conf.py +++ b/hermes/switch_conf.py @@ -508,4 +508,8 @@ def main() -> int: if __name__ == "__main__": - raise SystemExit(main()) + try: + raise SystemExit(main()) + except KeyboardInterrupt: + print("\n已取消。", file=sys.stderr) + raise SystemExit(130)