Skip to content

Commit b12b9b6

Browse files
author
Roman
committed
remove references to non-existent fields, add a clear error message
1 parent 2adc78f commit b12b9b6

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

bittensor_cli/src/commands/wallets.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -438,11 +438,10 @@ async def wallet_create(
438438
"name": wallet.name,
439439
"path": wallet.path,
440440
"hotkey": wallet.hotkey_str,
441-
"hotkey_ss58": wallet.hotkey.ss58_address,
442441
"coldkey_ss58": wallet.coldkeypub.ss58_address,
443442
}
444-
except KeyFileError:
445-
err = "KeyFileError: File is not writable"
443+
except KeyFileError as error:
444+
err = str(error)
446445
print_error(err)
447446
output_dict["error"] = err
448447
try:
@@ -458,10 +457,9 @@ async def wallet_create(
458457
"path": wallet.path,
459458
"hotkey": wallet.hotkey_str,
460459
"hotkey_ss58": wallet.hotkey.ss58_address,
461-
"coldkey_ss58": wallet.coldkeypub.ss58_address,
462460
}
463-
except KeyFileError:
464-
err = "KeyFileError: File is not writable"
461+
except KeyFileError as error:
462+
err = str(error)
465463
print_error(err)
466464
output_dict["error"] = err
467465
if json_output:

0 commit comments

Comments
 (0)