From 1fc3bda7e44b6eda25bb1625617e314fa5f56f22 Mon Sep 17 00:00:00 2001 From: midcoastal Date: Wed, 3 May 2023 11:46:38 -0400 Subject: [PATCH] Change `printD` to print to a 'Debug' stream STDERR is just a better place for this output. Mind you, it doesn't actually change anything about how it runs. Still behaves the way it has (in the terminal), just allows us to write scripts (hint hint) and pipe the output. --- scripts/ch_lib/util.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/ch_lib/util.py b/scripts/ch_lib/util.py index eedd874..a6632f2 100644 --- a/scripts/ch_lib/util.py +++ b/scripts/ch_lib/util.py @@ -1,5 +1,6 @@ # -*- coding: UTF-8 -*- import os +import sys import io import hashlib import requests @@ -16,7 +17,7 @@ proxies = None # print for debugging def printD(msg): - print(f"Civitai Helper: {msg}") + print(f"Civitai Helper: {msg}", file=sys.stderr) def read_chunks(file, size=io.DEFAULT_BUFFER_SIZE):