Revert "Bypass ComfyUI version check when in electron env (#1303)" (#1316)

This reverts commit 6f1bfae957.
This commit is contained in:
Dr.Lt.Data
2024-12-11 03:41:21 +09:00
committed by GitHub
parent 6f1bfae957
commit a32e551fd0
4 changed files with 255 additions and 51 deletions

View File

@@ -11,8 +11,6 @@ import threading
import re
import shutil
import git
import datetime
import logging
from server import PromptServer
import manager_core as core
@@ -1221,14 +1219,12 @@ async def get_notice(request):
markdown_content = add_target_blank(markdown_content)
try:
if core.is_electron:
pass
elif core.comfy_ui_commit_datetime == datetime.datetime(1900, 1, 1, 0, 0, 0):
if core.comfy_ui_commit_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 Exception as error:
logging.warning("Unexpected error when checking ComfyUI version via git.")
except:
pass
return web.Response(text=markdown_content, status=200)
else: