fix: robust cm_global
This commit is contained in:
17
__init__.py
17
__init__.py
@@ -301,14 +301,17 @@ def print_comfyui_version():
|
|||||||
comfy_ui_commit_date = repo.head.commit.committed_datetime.date()
|
comfy_ui_commit_date = repo.head.commit.committed_datetime.date()
|
||||||
|
|
||||||
# process on_revision_detected -->
|
# process on_revision_detected -->
|
||||||
for k, f in cm_global.variables['cm.on_revision_detected_handler']:
|
if 'cm.on_revision_detected_handler' in cm_global.variables:
|
||||||
try:
|
for k, f in cm_global.variables['cm.on_revision_detected_handler']:
|
||||||
f(comfy_ui_revision)
|
try:
|
||||||
except Exception:
|
f(comfy_ui_revision)
|
||||||
print(f"[ERROR] '{k}' on_revision_detected_handler")
|
except Exception:
|
||||||
traceback.print_exc()
|
print(f"[ERROR] '{k}' on_revision_detected_handler")
|
||||||
|
traceback.print_exc()
|
||||||
|
|
||||||
del cm_global.variables['cm.on_revision_detected_handler']
|
del cm_global.variables['cm.on_revision_detected_handler']
|
||||||
|
else:
|
||||||
|
print(f"[ComfyUI-Manager] Some features are restricted due to your ComfyUI being outdated.")
|
||||||
# <--
|
# <--
|
||||||
|
|
||||||
if current_branch == "master":
|
if current_branch == "master":
|
||||||
|
|||||||
Reference in New Issue
Block a user