api: Don't require 'https://' in site option.

The --site= option is really only for internal developer use, so I
don't think we gain anything from being strict about it.

(And it doesn't help that the error message one gets pre-this-patch is
super confusing).  Fixes Trac #937.

(imported from commit 8d699982aa6830f9eae2bccd6d0c7a1e0e53dd56)
This commit is contained in:
Tim Abbott 2013-06-17 17:06:28 -04:00
parent dfb8a16a55
commit 3bf748f9fb

View file

@ -90,6 +90,8 @@ class Client(object):
self.email = email
self.verbose = verbose
if site is not None:
if not site.startswith("http"):
site = "https://" + site
self.base_url = site
else:
self.base_url = "https://humbughq.com"