diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-12-14 10:10:43 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-14 10:10:43 +0300 |
commit | 097140ac1a3caf6e3c9980a757d4b52e6a76b789 (patch) | |
tree | c31cf29908f94e7f6792b063df4543d6f83b423c /modules/sysinfo.py | |
parent | bda86f0fd9653657c146f7c1128f92771d16ad4e (diff) | |
parent | 778a30a95e216f9f7ce0126dbbdb1334afc3d796 (diff) |
Merge branch 'dev' into master
Diffstat (limited to 'modules/sysinfo.py')
-rw-r--r-- | modules/sysinfo.py | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/modules/sysinfo.py b/modules/sysinfo.py index 2db7551d..b669edd0 100644 --- a/modules/sysinfo.py +++ b/modules/sysinfo.py @@ -1,7 +1,6 @@ import json
import os
import sys
-import traceback
import platform
import hashlib
@@ -84,7 +83,7 @@ def get_dict(): "Checksum": checksum_token,
"Commandline": get_argv(),
"Torch env info": get_torch_sysinfo(),
- "Exceptions": get_exceptions(),
+ "Exceptions": errors.get_exceptions(),
"CPU": {
"model": platform.processor(),
"count logical": psutil.cpu_count(logical=True),
@@ -104,21 +103,6 @@ def get_dict(): return res
-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:
- return list(reversed(errors.exception_records))
- except Exception as e:
- return str(e)
-
-
def get_environment():
return {k: os.environ[k] for k in sorted(os.environ) if k in environment_whitelist}
|