Bypass ComfyUI version check when in electron env (#1303)
* Hacky: hide the features we do not want to ship with electron app * Backup * Take install path for cm-cli. * Remove unused. * Add no deps. * Add no deps. * Bypass ComfyUI version check when in electron env * Fix exception when comfyui is not repo * Fix version reporting always skipped * Log unhandled errors --------- Co-authored-by: Yoland Y <4950057+yoland68@users.noreply.github.com> Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
This commit is contained in:
@@ -11,6 +11,8 @@ import threading
|
||||
import re
|
||||
import shutil
|
||||
import git
|
||||
import datetime
|
||||
import logging
|
||||
|
||||
from server import PromptServer
|
||||
import manager_core as core
|
||||
@@ -1219,12 +1221,14 @@ async def get_notice(request):
|
||||
markdown_content = add_target_blank(markdown_content)
|
||||
|
||||
try:
|
||||
if core.comfy_ui_commit_datetime == datetime(1900, 1, 1, 0, 0, 0):
|
||||
if core.is_electron:
|
||||
pass
|
||||
elif core.comfy_ui_commit_datetime == datetime.datetime(1900, 1, 1, 0, 0, 0):
|
||||
markdown_content = f'<P style="text-align: center; color:red; background-color:white; font-weight:bold">Your ComfyUI isn\'t git repo.</P>' + markdown_content
|
||||
elif core.comfy_ui_required_commit_datetime.date() > core.comfy_ui_commit_datetime.date():
|
||||
markdown_content = f'<P style="text-align: center; color:red; background-color:white; font-weight:bold">Your ComfyUI is too OUTDATED!!!</P>' + markdown_content
|
||||
except:
|
||||
pass
|
||||
except Exception as error:
|
||||
logging.warning("Unexpected error when checking ComfyUI version via git.")
|
||||
|
||||
return web.Response(text=markdown_content, status=200)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user