From: Roland Häder Date: Fri, 6 Oct 2023 13:59:34 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=7470a157e9056b075ddc09b6a040254f5651b738;p=fba.git Continued: - added some debug messages - formatted command - added alias 'hajkey' as 'misskey' alias --- diff --git a/fba/boot.py b/fba/boot.py index 6b90614..a79e428 100644 --- a/fba/boot.py +++ b/fba/boot.py @@ -40,7 +40,13 @@ def init_parser(): ) # Generic: - _PARSER.add_argument("--debug", action="store_const", dest="log_level", const=logging.DEBUG, help="Full debug output") + _PARSER.add_argument( + "--debug", + action="store_const", + dest="log_level", + const=logging.DEBUG, + help="Full debug output" + ) # Commands: subparser_command = _PARSER.add_subparsers( diff --git a/fba/database.py b/fba/database.py index 4a1ceb6..23bfab0 100644 --- a/fba/database.py +++ b/fba/database.py @@ -20,12 +20,14 @@ logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) # Connect to database +logger.debug("Opening database file blocks.db ...") connection = sqlite3.connect("blocks.db") # Attach trace function #connection.set_trace_callback(print) # Init row factory +logger.debug("connection='%s' - setting row factory ...", connection) connection.row_factory = sqlite3.Row # Get cursor diff --git a/fba/helpers/software.py b/fba/helpers/software.py index 4ada495..5f88dfd 100644 --- a/fba/helpers/software.py +++ b/fba/helpers/software.py @@ -48,7 +48,7 @@ def alias(software: str) -> str: elif software in ["hometown", "ecko", "fedibird", "glitchcafe"] or "되는 마스토돈" in software or "mastodon" in software: logger.debug("Setting mastodon: software='%s'", software) software = "mastodon" - elif software in ["slipfox calckey", "calckey", "groundpolis", "foundkey", "cherrypick", "meisskey", "magnetar", "keybump", "dolphin", "calckey social", "azk.sns", "firefish", "qtmmsky", "iceshrimp", "owohub", "re+", "russkey", "loverskey"] or "shumihub" in software or "мисскей" in software or "milkey" in software or "misskey" in software: + elif software in ["slipfox calckey", "calckey", "groundpolis", "foundkey", "cherrypick", "meisskey", "magnetar", "keybump", "dolphin", "calckey social", "azk.sns", "firefish", "qtmmsky", "iceshrimp", "owohub", "re+", "russkey", "loverskey", "hajkey"] or "shumihub" in software or "мисскей" in software or "milkey" in software or "misskey" in software: logger.debug("Setting misskey: software='%s'", software) software = "misskey" elif software in ["runtube.re", "islameye"]: