From e99b11565c9c465d594339349486cf68bdf47e59 Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Tue, 15 Mar 2022 12:38:39 +0100 Subject: [PATCH] pyln: Change the default argument to `exclude` in `pay` We must use `None` for default arguments since otherwise they aren't filtered out when serializing the request. In addition default arguments to functions are initialized once and, if mutable, could persist internal changes across function calls. Changelog-None --- contrib/pyln-client/pyln/client/lightning.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/pyln-client/pyln/client/lightning.py b/contrib/pyln-client/pyln/client/lightning.py index b76ad2843..12759d694 100644 --- a/contrib/pyln-client/pyln/client/lightning.py +++ b/contrib/pyln-client/pyln/client/lightning.py @@ -990,7 +990,7 @@ class LightningRpc(UnixDomainSocketRpc): def pay(self, bolt11, msatoshi=None, label=None, riskfactor=None, maxfeepercent=None, retry_for=None, - maxdelay=None, exemptfee=None, exclude=[]): + maxdelay=None, exemptfee=None, exclude=None): """ Send payment specified by {bolt11} with {msatoshi} (ignored if {bolt11} has an amount), optional {label}