Skip to content

Commit

Permalink
hku_catch 忽略对 KeyboardInterrupt 的捕获,以免 Ctrl-C 无法终止
Browse files Browse the repository at this point in the history
  • Loading branch information
fasiondog committed Apr 5, 2024
1 parent 5ae5e05 commit 8524ff3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hikyuu/util/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ def wrappedFunc(*args, **kargs):
callback(*args, **kargs)
if re_raise:
raise Exception(errmsg)
except KeyboardInterrupt:
raise KeyboardInterrupt()
except:
errmsg = "Unknown error! {} [{}.{}]".format(get_exception_info(), func.__module__, func.__name__)
hku_logger.error(errmsg)
Expand Down

0 comments on commit 8524ff3

Please sign in to comment.