do not raise BaseException
This commit is contained in:
@@ -107,7 +107,7 @@ class DigitalBitbox_Client():
|
||||
xpub = serialize_xpub(xtype, c, cK, depth, fingerprint, child_number)
|
||||
return xpub
|
||||
else:
|
||||
raise BaseException('no reply')
|
||||
raise Exception('no reply')
|
||||
|
||||
|
||||
def dbb_has_password(self):
|
||||
|
||||
@@ -344,7 +344,7 @@ class KeepKeyCompatiblePlugin(HW_PluginBase):
|
||||
elif addrtype == constants.net.ADDRTYPE_P2SH:
|
||||
txoutputtype.script_type = self.types.PAYTOSCRIPTHASH
|
||||
else:
|
||||
raise BaseException('addrtype: ' + str(addrtype))
|
||||
raise Exception('addrtype: ' + str(addrtype))
|
||||
txoutputtype.address = address
|
||||
return txoutputtype
|
||||
|
||||
|
||||
@@ -72,10 +72,10 @@ class LabelsPlugin(BasePlugin):
|
||||
kwargs['headers']['Content-Type'] = 'application/json'
|
||||
response = requests.request(method, url, **kwargs)
|
||||
if response.status_code != 200:
|
||||
raise BaseException(response.status_code, response.text)
|
||||
raise Exception(response.status_code, response.text)
|
||||
response = response.json()
|
||||
if "error" in response:
|
||||
raise BaseException(response["error"])
|
||||
raise Exception(response["error"])
|
||||
return response
|
||||
|
||||
def do_request_safe(self, *args, **kwargs):
|
||||
|
||||
@@ -188,7 +188,7 @@ class Ledger_Client():
|
||||
self.perform_hw1_preflight()
|
||||
except BTChipException as e:
|
||||
if (e.sw == 0x6d00 or e.sw == 0x6700):
|
||||
raise BaseException(_("Device not in Bitcoin mode")) from e
|
||||
raise Exception(_("Device not in Bitcoin mode")) from e
|
||||
raise e
|
||||
self.preflightDone = True
|
||||
|
||||
|
||||
@@ -406,7 +406,7 @@ class TrustedCoinPlugin(BasePlugin):
|
||||
xprv1, xpub1 = self.get_xkeys(seed, passphrase, "m/0'/")
|
||||
xprv2, xpub2 = self.get_xkeys(seed, passphrase, "m/1'/")
|
||||
else:
|
||||
raise BaseException('unrecognized seed length: {} words'.format(n))
|
||||
raise Exception('unrecognized seed length: {} words'.format(n))
|
||||
return xprv1, xpub1, xprv2, xpub2
|
||||
|
||||
def create_keystore(self, wizard, seed, passphrase):
|
||||
|
||||
Reference in New Issue
Block a user