(stream, prefix)
| 542 | cloned_repos = [] |
| 543 | |
| 544 | def msg_capture(stream, prefix): |
| 545 | stream.reconfigure(encoding=locale.getpreferredencoding(), errors='replace') |
| 546 | for msg in stream: |
| 547 | if msg.startswith("CLONE: "): |
| 548 | cloned_repos.append(msg[7:]) |
| 549 | if prefix == '[!]': |
| 550 | print(prefix, msg, end="", file=sys.stderr) |
| 551 | else: |
| 552 | print(prefix, msg, end="") |
| 553 | |
| 554 | elif prefix == '[!]' and ('it/s]' in msg or 's/it]' in msg) and ('%|' in msg or 'it [' in msg): |
| 555 | if msg.startswith('100%'): |
| 556 | print('\r' + msg, end="", file=sys.stderr), |
| 557 | else: |
| 558 | print('\r'+msg[:-1], end="", file=sys.stderr), |
| 559 | else: |
| 560 | if prefix == '[!]': |
| 561 | print(prefix, msg, end="", file=sys.stderr) |
| 562 | else: |
| 563 | print(prefix, msg, end="") |
| 564 | |
| 565 | print("[ComfyUI-Manager] Restore snapshot.") |
| 566 | new_env = os.environ.copy() |
nothing calls this directly
no test coverage detected