Don't import debug in bitmessageqt

This commit is contained in:
Dmitri Bogomolov 2021-02-25 17:17:57 +02:00
parent b6c979091f
commit 0dceb7e15c
Signed by untrusted user: g1itch
GPG Key ID: 720A756F18DEED13
2 changed files with 8 additions and 4 deletions

View File

@ -3,6 +3,7 @@ PyQt based UI for bitmessage, the main module
"""
import hashlib
import logging
import os
import random
import string
@ -19,7 +20,6 @@ from PyQt4.QtNetwork import QLocalSocket, QLocalServer
import shared
import state
from debug import logger
from tr import _translate
from addresses import decodeAddress, addBMIfNotPresent
from bmconfigparser import BMConfigParser
@ -58,6 +58,8 @@ try:
except ImportError:
get_plugins = False
logger = logging.getLogger('default')
# TODO: rewrite
def powQueueSize():

View File

@ -1,3 +1,4 @@
import logging
import locale
import os
import sys
@ -8,7 +9,6 @@ import paths
import settingsmixin
import widgets
from bmconfigparser import BMConfigParser
from debug import logger
from foldertree import AddressBookCompleter
from tr import _translate
@ -20,6 +20,8 @@ class Window(settingsmixin.SMainWindow):
super(Window, self).__init__(parent)
widgets.load('main.ui', self)
self.logger = logging.getLogger('default')
self.qmytranslator = self.qsystranslator = None
self.blackwhitelist.rerenderBlackWhiteList()
@ -143,7 +145,7 @@ class Window(settingsmixin.SMainWindow):
l10n.encoding = locale.nl_langinfo(locale.CODESET)
else:
l10n.encoding = locale.getlocale()[1]
logger.info("Successfully set locale to %s", lang)
self.logger.info("Successfully set locale to %s", lang)
break
except:
logger.error("Failed to set locale to %s", lang, exc_info=True)
self.logger.error("Failed to set locale to %s", lang, exc_info=True)