diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-07-15 06:33:21 +0000 |
---|---|---|
committer | AUTOMATIC1111 <16777216c@gmail.com> | 2023-07-15 06:33:21 +0000 |
commit | c58cf73c806f08eb8b96bccc2af64403d903695f (patch) | |
tree | 77b2b00fb9165b9f4f23d3a2eb4589895df49140 /modules/launch_utils.py | |
parent | 0aa8d538e147ba87df36d8196845807c8fa3f4e1 (diff) | |
download | stable-diffusion-webui-gfx803-c58cf73c806f08eb8b96bccc2af64403d903695f.tar.gz stable-diffusion-webui-gfx803-c58cf73c806f08eb8b96bccc2af64403d903695f.tar.bz2 stable-diffusion-webui-gfx803-c58cf73c806f08eb8b96bccc2af64403d903695f.zip |
remove "## " from changelog.md version
Diffstat (limited to 'modules/launch_utils.py')
-rw-r--r-- | modules/launch_utils.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/modules/launch_utils.py b/modules/launch_utils.py index 0e0dbca4..ff77cbfd 100644 --- a/modules/launch_utils.py +++ b/modules/launch_utils.py @@ -69,10 +69,12 @@ def git_tag(): return subprocess.check_output([git, "describe", "--tags"], shell=False, encoding='utf8').strip()
except Exception:
try:
- from pathlib import Path
- changelog_md = Path(__file__).parent.parent / "CHANGELOG.md"
- with changelog_md.open(encoding="utf-8") as file:
- return next((line.strip() for line in file if line.strip()), "<none>")
+
+ changelog_md = os.path.join(os.path.dirname(os.path.dirname(__file__)), "CHANGELOG.md")
+ with open(changelog_md, "r", encoding="utf-8") as file:
+ line = next((line.strip() for line in file if line.strip()), "<none>")
+ line = line.replace("## ", "")
+ return line
except Exception:
return "<none>"
|