diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-08-01 16:55:55 +0300 |
---|---|---|
committer | AUTOMATIC1111 <16777216c@gmail.com> | 2023-08-01 16:55:55 +0300 |
commit | 0c9b1e7969b2adb39c38d17b481a689483059459 (patch) | |
tree | 721ae5bc4143f21c8034819755977dc4d293640d /modules/sysinfo.py | |
parent | 151b8ed3a62714793e2a212ac609a03dda0b1e26 (diff) | |
parent | 6a0d498c8ec5287a75e2a3bc8a4fa79e82e64c18 (diff) |
Merge branch 'dev' into multiple_loaded_models
Diffstat (limited to 'modules/sysinfo.py')
-rw-r--r-- | modules/sysinfo.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/sysinfo.py b/modules/sysinfo.py index 5f15ac4f..cf24c6dd 100644 --- a/modules/sysinfo.py +++ b/modules/sysinfo.py @@ -109,11 +109,15 @@ def format_traceback(tb): return [[f"{x.filename}, line {x.lineno}, {x.name}", x.line] for x in traceback.extract_tb(tb)]
+def format_exception(e, tb):
+ return {"exception": str(e), "traceback": format_traceback(tb)}
+
+
def get_exceptions():
try:
from modules import errors
- return [{"exception": str(e), "traceback": format_traceback(tb)} for e, tb in reversed(errors.exception_records)]
+ return list(reversed(errors.exception_records))
except Exception as e:
return str(e)
|