diff --git a/bond/commands/token.py b/bond/commands/token.py index 9835135..0c228db 100644 --- a/bond/commands/token.py +++ b/bond/commands/token.py @@ -8,18 +8,18 @@ def update_token(token): bonds = BondDatabase.get_bonds() if bondid not in bonds.keys(): bonds[bondid] = dict() - bonds[bondid]["token"] = token - print(f"Updated token for {bondid}") + bonds.get(bondid, {})["token"] = token + print("Updated token for %s" % bondid) BondDatabase.set("bonds", bonds) class TokenCommand(BaseCommand): subcmd = "token" help = "Manage token-based authentication." - arguments = {"TOKEN": {"help": "Save Bond token to local database"}} + arguments = {"token": {"help": "Save Bond token to local database"}} def run(self, args): - update_token(args["Token"]) + update_token(args.token) def register(): diff --git a/setup.py b/setup.py index bd2054a..c2733da 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ setup( name='bond-cli', - version='0.0.6', + version='0.0.7', author='Olibra', packages=find_packages(), scripts=['bond/bond'],