bitcoin-dev-project / warnet

Monitor and analyze the emergent behaviors of Bitcoin networks
https://warnet.dev
MIT License
59 stars 27 forks source link

bug: build_args default is None #309

Closed pinheadmz closed 2 months ago

pinheadmz commented 2 months ago

I'd open a PR but I'm trapped in another branch right now...

error:

  File "/Users/matthewzipkin/Desktop/work/warnet/src/backends/compose/compose_backend.py", line 399, in add_services
    tank.DEFAULT_BUILD_ARGS + tank.build_args,
    ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
TypeError: can only concatenate str (not "NoneType") to str

patch:

diff --git a/src/schema/node_schema.json b/src/schema/node_schema.json
index c2707fc..e50b6c4 100644
--- a/src/schema/node_schema.json
+++ b/src/schema/node_schema.json
@@ -10,7 +10,7 @@
     "tc_netem": {"type": "string"},
     "exporter": {"type": "boolean", "default": false},
     "collect_logs": {"type": "boolean", "default": false},
-    "build_args": {"type": "string"},
+    "build_args": {"type": "string", "default": ""},
     "ln": {"type": "string"},
     "ln-image": {"type": "string"},
     "ln-cb-image": {"type": "string"},