Skip to content

Commit 4786ec8

Browse files
committed
Default login/register URL to http:// schema if it's not specified.
1 parent 5f8d83b commit 4786ec8

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

client/deis.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,8 @@ def auth_register(self, args):
568568
--email=EMAIL provide an email address
569569
"""
570570
controller = args['<controller>']
571+
if not urlparse.urlparse(controller).scheme:
572+
controller = "http://{}".format(controller)
571573
username = args.get('--username')
572574
if not username:
573575
username = raw_input('username: ')
@@ -635,6 +637,8 @@ def auth_login(self, args):
635637
Usage: deis auth:login <controller> [--username=<username> --password=<password>]
636638
"""
637639
controller = args['<controller>']
640+
if not urlparse.urlparse(controller).scheme:
641+
controller = "http://{}".format(controller)
638642
username = args.get('--username')
639643
headers = {}
640644
if not username:

0 commit comments

Comments
 (0)