"
-
- remote = f"""{html.escape(webui_remote or '')}"""
- commit_link = make_commit_link(webui_commit_hash, webui_remote)
- date_link = make_commit_link(webui_commit_hash, webui_remote, webui_commit_date)
-
- current_webui = config_states.get_webui_config()
-
- style_remote = ""
- style_branch = ""
- style_commit = ""
- if current_webui["remote"] != webui_remote:
- style_remote = STYLE_PRIMARY
- if current_webui["branch"] != webui_branch:
- style_branch = STYLE_PRIMARY
- if current_webui["commit_hash"] != webui_commit_hash:
- style_commit = STYLE_PRIMARY
-
- code += f"""Config Backup: {config_name}
- Filepath: {filepath}
- Created at: {created_date}
"""
-
- code += f"""WebUI State
-
-
-
- URL |
- Branch |
- Commit |
- Date |
-
-
-
-
- |
- |
- |
- |
-
-
-
- """
-
- code += """Extension State
-
- """
+ if current_webui["remote"] != webui_remote:
+ style_remote = STYLE_PRIMARY
+ if current_webui["branch"] != webui_branch:
+ style_branch = STYLE_PRIMARY
+ if current_webui["commit_hash"] != webui_commit_hash:
+ style_commit = STYLE_PRIMARY
+
+ code = f"""
+Config Backup: {config_name}
+Filepath: {filepath}
+Created at: {created_date}
+WebUI State
+
+
+
+ URL |
+ Branch |
+ Commit |
+ Date |
+
+
+
+
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+
+Extension State
+"""
+
+ except Exception as e:
+ print(f"[ERROR]: Config states {filepath}, {e}")
+ code = f"""
+Config Backup: {config_name}
+Filepath: {filepath}
+Created at: {created_date}
+This file is corrupted
"""
return code
--
cgit v1.2.3