logging: basics
This commit is contained in:
@@ -29,9 +29,10 @@ from decimal import Decimal
|
||||
from PyQt5.QtGui import QFontMetrics
|
||||
|
||||
from electrum import bitcoin
|
||||
from electrum.util import bfh, PrintError
|
||||
from electrum.util import bfh
|
||||
from electrum.transaction import TxOutput, push_script
|
||||
from electrum.bitcoin import opcodes
|
||||
from electrum.logging import Logger
|
||||
|
||||
from .qrtextedit import ScanQRTextEdit
|
||||
from .completion_text_edit import CompletionTextEdit
|
||||
@@ -43,11 +44,12 @@ frozen_style = "QWidget { background-color:none; border:none;}"
|
||||
normal_style = "QPlainTextEdit { }"
|
||||
|
||||
|
||||
class PayToEdit(CompletionTextEdit, ScanQRTextEdit, PrintError):
|
||||
class PayToEdit(CompletionTextEdit, ScanQRTextEdit, Logger):
|
||||
|
||||
def __init__(self, win):
|
||||
CompletionTextEdit.__init__(self)
|
||||
ScanQRTextEdit.__init__(self)
|
||||
Logger.__init__(self)
|
||||
self.win = win
|
||||
self.amount_edit = win.amount_e
|
||||
self.document().contentsChanged.connect(self.update_size)
|
||||
@@ -226,7 +228,7 @@ class PayToEdit(CompletionTextEdit, ScanQRTextEdit, PrintError):
|
||||
try:
|
||||
data = self.win.contacts.resolve(key)
|
||||
except Exception as e:
|
||||
self.print_error(f'error resolving address/alias: {repr(e)}')
|
||||
self.logger.info(f'error resolving address/alias: {repr(e)}')
|
||||
return
|
||||
if not data:
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user