mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-22 00:24:19 +01:00
pyln: fix incorrect python syntax.
contrib/pyln-proto/pyln/proto/bech32.py:120
/home/rusty/devel/cvs/lightning/contrib/pyln-proto/pyln/proto/bech32.py:120: SyntaxWarning: "is not" with a literal. Did you mean "!="?
assert decode(hrp, ret) is not (None, None)
I think this warning is correct (though I don't see the warning once I installed coincurve:
are we suppressing warnings?)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
4bcac3032c
commit
97e3d61748
@@ -117,5 +117,5 @@ def decode(hrp, addr):
|
|||||||
def encode(hrp, witver, witprog):
|
def encode(hrp, witver, witprog):
|
||||||
"""Encode a segwit address."""
|
"""Encode a segwit address."""
|
||||||
ret = bech32_encode(hrp, [witver] + convertbits(witprog, 8, 5))
|
ret = bech32_encode(hrp, [witver] + convertbits(witprog, 8, 5))
|
||||||
assert decode(hrp, ret) is not (None, None)
|
assert decode(hrp, ret) != (None, None)
|
||||||
return ret
|
return ret
|
||||||
|
|||||||
Reference in New Issue
Block a user