From 4ce8f563279dd88a6a720703c560b72896f81f82 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Thu, 6 Aug 2020 09:57:56 +0930 Subject: [PATCH] pyln.client.plugin: set deprcated_apis based on getmanifest. Signed-off-by: Rusty Russell --- contrib/pyln-client/pyln/client/plugin.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/contrib/pyln-client/pyln/client/plugin.py b/contrib/pyln-client/pyln/client/plugin.py index 60f5b4fab..20f0c76a1 100644 --- a/contrib/pyln-client/pyln/client/plugin.py +++ b/contrib/pyln-client/pyln/client/plugin.py @@ -523,6 +523,12 @@ class Plugin(object): partial = self._multi_dispatch(msgs) def _getmanifest(self, **kwargs): + if 'allow-deprecated-apis' in kwargs: + self.deprecated_apis = kwargs['allow-deprecated-apis'] + else: + # 0.9.0 and before didn't offer this, so assume "yes". + self.deprecated_apis = True + methods = [] hooks = [] for method in self.methods.values():