pylightning/plugin: add lightning_version member to plugin

This commit is contained in:
Simon Vrouwe 2019-08-23 13:28:06 +03:00 committed by neil saitug
parent da74f0118d
commit 2f5f364e17

View File

@ -111,6 +111,9 @@ class Plugin(object):
if not stdin:
self.stdin = sys.stdin
self.lightning_version = None
if os.getenv('LIGHTNINGD_VERSION'):
self.lightning_version = os.getenv('LIGHTNINGD_VERSION')
if os.getenv('LIGHTNINGD_PLUGIN') and autopatch:
monkey_patch(self, stdout=True, stderr=True)