Skip to content

Commit 52f58fb

Browse files
committed
Ensure that bool config items are bool.
1 parent 6ec1ad3 commit 52f58fb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

bittensor_cli/cli.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1257,7 +1257,7 @@ def main_callback(
12571257
):
12581258
"""
12591259
Command line interface (CLI) for Bittensor. Uses the values in the configuration file. These values can be
1260-
overriden by passing them explicitly in the command line.
1260+
overridden by passing them explicitly in the command line.
12611261
"""
12621262
# Load or create the config file
12631263
if os.path.exists(self.config_path):
@@ -1281,6 +1281,9 @@ def main_callback(
12811281
if sub_key not in config[key]:
12821282
config[key][sub_key] = sub_value
12831283
updated = True
1284+
elif isinstance(value, bool) and config[key] is None:
1285+
config[key] = value
1286+
updated = True
12841287
if updated:
12851288
with open(self.config_path, "w") as f:
12861289
safe_dump(config, f)

0 commit comments

Comments
 (0)