commit 3a2888154fcf9ec6b04440384f2346eac69e4e37 parent 2fe4a3c3f70e9e57b1339e2d41d66aa5380d0f53 Author: Kristaps Kaupe <kristaps@blogiem.lv> Date: Thu, 31 Mar 2022 07:29:23 +0300 Fix startup for onchain only (no lightning) configurations (#61) Diffstat:
M | satsale.py | | | 10 | +++++++--- |
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/satsale.py b/satsale.py @@ -378,9 +378,13 @@ if config.node_info is not None: ) # Add lightning address -if lightning_node.config['lightning_address'] is not None: - from gateways import lightning_address - lightning_address.add_ln_address_decorators(app, api, lightning_node) +try: + if lightning_node.config['lightning_address'] is not None: + from gateways import lightning_address + lightning_address.add_ln_address_decorators(app, api, lightning_node) +except NameError: + # lightning_node is not defined if no LN support configured + pass # Add Paynym if config.paynym is not None: