diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-08-23 12:48:09 +0000 |
---|---|---|
committer | AUTOMATIC1111 <16777216c@gmail.com> | 2023-08-23 12:48:09 +0000 |
commit | c9c8485bc1e8720aba70f029d25cba1c4abf2b5c (patch) | |
tree | 572e29867d4df32cf33df284cf96e8611b78045c /modules/sysinfo.py | |
parent | 68f336bd994bed5442ad95bad6b6ad5564a5409a (diff) | |
parent | 31f2be3dcedf85c036c5f784c640208d122b62ed (diff) | |
download | stable-diffusion-webui-gfx803-c9c8485bc1e8720aba70f029d25cba1c4abf2b5c.tar.gz stable-diffusion-webui-gfx803-c9c8485bc1e8720aba70f029d25cba1c4abf2b5c.tar.bz2 stable-diffusion-webui-gfx803-c9c8485bc1e8720aba70f029d25cba1c4abf2b5c.zip |
Merge branch 'release_candidate'
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)
|