1
0

bugfix: assert walrus (":=") combo side-eff. breaks w/ asserts disabled

```
$ python3 -O
Python 3.10.6 (main, Mar 10 2023, 10:55:28) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> assert (x := 2)
>>> x
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'x' is not defined
```

pity. it looked to be a neat and concise pattern.
This commit is contained in:
SomberNight
2023-04-20 15:17:36 +00:00
parent 22205dccb1
commit be159b5b95
6 changed files with 18 additions and 9 deletions

View File

@@ -528,7 +528,8 @@ class DigitalBitbox_KeyStore(Hardware_KeyStore):
if txin.is_coinbase_input():
self.give_error("Coinbase not supported") # should never happen
assert (desc := txin.script_descriptor)
desc = txin.script_descriptor
assert desc
if desc.to_legacy_electrum_script_type() != 'p2pkh':
p2pkhTransaction = False