From cb227f9cf4ef6e8e2d6ae158f2e86c5f5046cdb0 Mon Sep 17 00:00:00 2001 From: Hay1tsme Date: Fri, 24 Feb 2023 14:13:31 -0500 Subject: [PATCH] remove unnecessassary print statements --- core/utils.py | 6 +++--- dbutils.py | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/core/utils.py b/core/utils.py index a14f9ff..d4b7f16 100644 --- a/core/utils.py +++ b/core/utils.py @@ -1,6 +1,6 @@ -from typing import Dict, List, Any, Optional +from typing import Dict, Any from types import ModuleType -import zlib, base64 +import logging import importlib from os import walk @@ -17,6 +17,6 @@ class Utils: ret[dir] = mod except ImportError as e: - print(f"{dir} - {e}") + logging.getLogger("core").error(f"get_all_titles: {dir} - {e}") raise return ret diff --git a/dbutils.py b/dbutils.py index 8e6024b..d52128e 100644 --- a/dbutils.py +++ b/dbutils.py @@ -23,22 +23,22 @@ if __name__=='__main__': elif args.action == "upgrade" or args.action == "rollback": if args.version is None: - print("Must set game and version to migrate to") + data.logger.error("Must set game and version to migrate to") exit(0) if args.game is None: - print("No game set, upgrading core schema") + data.logger.info("No game set, upgrading core schema") data.migrate_database("CORE", int(args.version)) else: data.migrate_database(args.game, int(args.version), args.action) elif args.action == "migrate": - print("Migrating from old schema to new schema") + data.logger.info("Migrating from old schema to new schema") data.restore_from_old_schema() elif args.action == "dump": - print("Dumping old schema to migrate to new schema") + data.logger.info("Dumping old schema to migrate to new schema") data.dump_db() elif args.action == "generate":