Fix support for Windows systems
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import os
|
||||
|
||||
import socket
|
||||
import tomli
|
||||
from loguru import logger
|
||||
|
||||
@@ -12,8 +12,7 @@ with open(config_file, mode="rb") as fp:
|
||||
|
||||
app = _cfg.get("app", {})
|
||||
whisper = _cfg.get("whisper", {})
|
||||
|
||||
hostname = os.uname().nodename
|
||||
hostname = socket.gethostname()
|
||||
|
||||
log_level = _cfg.get("log_level", "DEBUG")
|
||||
listen_host = _cfg.get("listen_host", "0.0.0.0")
|
||||
@@ -23,6 +22,10 @@ project_description = _cfg.get("project_description", "MoneyPrinterTurbo\n by
|
||||
project_version = _cfg.get("project_version", "1.0.0")
|
||||
reload_debug = False
|
||||
|
||||
imagemagick_path = app.get("imagemagick_path", "")
|
||||
if imagemagick_path and os.path.isfile(imagemagick_path):
|
||||
os.environ["IMAGEMAGICK_BINARY"] = imagemagick_path
|
||||
|
||||
__cfg = {
|
||||
"hostname": hostname,
|
||||
"listen_host": listen_host,
|
||||
|
||||
Reference in New Issue
Block a user