Skip to content
This repository was archived by the owner on Aug 11, 2020. It is now read-only.

Commit e7b88f5

Browse files
committed
Change login deprecation message and add msg after apiKey cmd
1 parent 345ee75 commit e7b88f5

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

paperspace/cli/auth.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55
from paperspace.cli.cli import cli
66
from paperspace.commands import login as login_commands
77

8-
LOGIN_DEPRECATION_MESSAGE = """The login command is currently disabled for logging in with `--email` and `--password`.
8+
LOGIN_DEPRECATION_MESSAGE = """The login command is currently disabled for logging in using `--email` and `--password`.
99
10-
Instead, obtain an API Key from https://www.paperspace.com/console/account/api and then use the `apiKey` command to store your API Key.
10+
Instead, obtain an API Key from https://www.paperspace.com/console/account/api.
11+
12+
Then use the `apiKey` command to save your API Key locally.
1113
1214
Visit the docs @ https://docs.paperspace.com for more info!"""
1315

@@ -39,7 +41,7 @@ def logout():
3941

4042

4143
@cli.command("apiKey", help="Save your api key")
42-
@click.argument("api_key", required=False, callback=common.prompt_for_secret("API Key: "))
44+
@click.argument("api_key", required=False, callback=common.prompt_for_secret("Enter your API Key: "))
4345
def save_api_key(api_key):
4446
command = login_commands.SetApiKeyCommand()
4547
command.execute(api_key)

paperspace/login.py

+2
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ def set_apikey(apikey):
125125
json.dump(config_data, outfile, indent=2, sort_keys=True)
126126
outfile.write('\n')
127127

128+
logger.log("Successfully added API Key to {}. You're ready to go!".format(config_path))
129+
128130
return True
129131

130132

0 commit comments

Comments
 (0)