diff --git a/pkgs/by-name/clightning-sane/clightning-sane b/pkgs/by-name/clightning-sane/clightning-sane index 83e3dcb36..334633255 100755 --- a/pkgs/by-name/clightning-sane/clightning-sane +++ b/pkgs/by-name/clightning-sane/clightning-sane @@ -769,13 +769,18 @@ def main(): rpc = RpcHelper(LightningRpc(RPC_FILE)) - if args.action == "status": + action = getattr(args, "action", None) + + if action is None: + show_status(rpc) + + if action == "status": show_status(rpc, full=args.full) - if args.action == "loop": + if action == "loop": balance_loop(rpc, out=args.out, in_=args.in_, amount_msat=int(args.amount), min_msat=int(args.min_msat), max_msat=int(args.max_msat), parallelism=int(args.jobs)) - if args.action == "autobalance": + if action == "autobalance": autobalance(rpc, min_msat=int(args.min_msat), max_msat=int(args.max_msat), parallelism=int(args.jobs)) if __name__ == '__main__':