aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw-e-w <40751091+w-e-w@users.noreply.github.com>2023-11-20 01:38:31 +0900
committerw-e-w <40751091+w-e-w@users.noreply.github.com>2023-11-20 01:38:31 +0900
commit6d337bf23dae990e7b6717da4d5f2e54f212685c (patch)
tree64389296a685ebf31356d8e8c9fd49bf95c94226
parentfc83af443265d8938cf778143aefec1129d95c42 (diff)
save sysinfo as .json
GitHub now allows uploading of .json files in issues
-rw-r--r--modules/launch_utils.py2
-rw-r--r--modules/ui.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/launch_utils.py b/modules/launch_utils.py
index 8cdbafa5..264ec9ca 100644
--- a/modules/launch_utils.py
+++ b/modules/launch_utils.py
@@ -441,7 +441,7 @@ def dump_sysinfo():
import datetime
text = sysinfo.get()
- filename = f"sysinfo-{datetime.datetime.utcnow().strftime('%Y-%m-%d-%H-%M')}.txt"
+ filename = f"sysinfo-{datetime.datetime.utcnow().strftime('%Y-%m-%d-%H-%M')}.json"
with open(filename, "w", encoding="utf8") as file:
file.write(text)
diff --git a/modules/ui.py b/modules/ui.py
index ba0d8542..b82f3c5e 100644
--- a/modules/ui.py
+++ b/modules/ui.py
@@ -1308,7 +1308,7 @@ def setup_ui_api(app):
from fastapi.responses import PlainTextResponse
text = sysinfo.get()
- filename = f"sysinfo-{datetime.datetime.utcnow().strftime('%Y-%m-%d-%H-%M')}.txt"
+ filename = f"sysinfo-{datetime.datetime.utcnow().strftime('%Y-%m-%d-%H-%M')}.json"
return PlainTextResponse(text, headers={'Content-Disposition': f'{"attachment" if attachment else "inline"}; filename="{filename}"'})