forked from bitcoinafterlife/bal-electrum-plugin
WillException.init bug
This commit is contained in:
23
qt.py
23
qt.py
@@ -15,14 +15,12 @@ from datetime import datetime
|
||||
from decimal import Decimal
|
||||
from functools import partial
|
||||
from typing import TYPE_CHECKING, Any, Callable, Mapping, Optional, Union
|
||||
import traceback
|
||||
try:
|
||||
QT_VERSION = sys._GUI_QT_VERSION
|
||||
except Exception:
|
||||
QT_VERSION = 6
|
||||
|
||||
if QT_VERSION == 5:
|
||||
from PyQt5.QtCore import QThread, QCoreApplication
|
||||
from PyQt5.QtCore import (
|
||||
QDateTime,
|
||||
QModelIndex,
|
||||
@@ -58,7 +56,6 @@ if QT_VERSION == 5:
|
||||
QWidget,
|
||||
)
|
||||
else: # QT6
|
||||
from PyQt6.QtCore import QThread, QCoreApplication
|
||||
from PyQt6.QtCore import (
|
||||
QDateTime,
|
||||
QModelIndex,
|
||||
@@ -745,7 +742,7 @@ class BalWindow(Logger):
|
||||
self.bal_plugin.WILL_SETTINGS.set(self.will_settings)
|
||||
try:
|
||||
self.heir_list_widget.heir_locktime.set_locktime(locktime)
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
pass
|
||||
#self.preview_list.heirs_locktime.set_locktim(will_settings['thershold'])
|
||||
|
||||
@@ -758,11 +755,11 @@ class BalWindow(Logger):
|
||||
self.bal_plugin.WILL_SETTINGS.set(self.will_settings)
|
||||
try:
|
||||
self.heir_list_widget.heir_threshold.set_locktime(threshold)
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
pass
|
||||
try:
|
||||
self.will_list.heir_threshold.set_locktime(threshold)
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
def init_heirs_to_locktime(self, multiverse=False):
|
||||
@@ -1068,7 +1065,7 @@ class BalWindow(Logger):
|
||||
a,b,c = err
|
||||
self.logger.error(f"fail to broadcast transactions:{err}")
|
||||
self.logger.error(f"error: {b}")
|
||||
self.logger.error(f"traceback ")
|
||||
self.logger.error("traceback ")
|
||||
tb = c
|
||||
while tb is not None:
|
||||
frame = tb.tb_frame
|
||||
@@ -1238,11 +1235,11 @@ class BalWindow(Logger):
|
||||
# del self.waiting_dialog
|
||||
try:
|
||||
parent.will_executor_list_widget.update()
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
pass
|
||||
try:
|
||||
parent.willexecutors_list.update()
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
def on_failure(e):
|
||||
@@ -1349,7 +1346,7 @@ class HeirsLockTimeEdit(QWidget, _LockTimeEditor):
|
||||
for w in self.editors:
|
||||
w.setVisible(False)
|
||||
w.setEnabled(False)
|
||||
prev_locktime = self.editor.get_locktime()
|
||||
#prev_locktime = self.editor.get_locktime()
|
||||
self.editor = self.option_index_to_editor_map[i]
|
||||
#if self.editor.is_acceptable_locktime(prev_locktime):
|
||||
# self.editor.set_locktime(prev_locktime, force=False)
|
||||
@@ -1369,7 +1366,7 @@ class HeirsLockTimeEdit(QWidget, _LockTimeEditor):
|
||||
try:
|
||||
int(x)
|
||||
self.set_index(1)
|
||||
except:
|
||||
except Exception:
|
||||
if isinstance(x,str):
|
||||
self.set_index(0)
|
||||
self.editor.set_locktime(x, force=False)
|
||||
@@ -2468,7 +2465,7 @@ class BalBuildWillDialog(BalDialog):
|
||||
self.msg_set_pushing(self.msg_ok())
|
||||
|
||||
except Exception as e:
|
||||
td = traceback.format_exc()
|
||||
#td = traceback.format_exc()
|
||||
self.msg_set_pushing(self.msg_error(e))
|
||||
self.msg_edit_row(self.msg_ok())
|
||||
self.wait(5)
|
||||
@@ -2539,7 +2536,7 @@ class BalBuildWillDialog(BalDialog):
|
||||
def msg_edit_row(self, line, row=None):
|
||||
try:
|
||||
self.labels[row] = line
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
self.labels.append(line)
|
||||
row = len(self.labels) - 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user