pass api url not site
This commit is contained in:
parent
19115f1886
commit
66e03ef508
1 changed files with 7 additions and 2 deletions
|
@ -139,12 +139,17 @@ class API(object):
|
|||
shutil.move(tmpname, filename)
|
||||
|
||||
|
||||
def signin(site):
|
||||
def signin(url):
|
||||
import sys
|
||||
from getpass import getpass
|
||||
from .web import auth
|
||||
|
||||
api = API('https://%s/api/' % site)
|
||||
if not url.startswith('http'):
|
||||
site = url
|
||||
url = 'https://%s/api/' % url
|
||||
else:
|
||||
site = url.split('/')[2]
|
||||
api = API(url)
|
||||
update = False
|
||||
try:
|
||||
credentials = auth.get(site)
|
||||
|
|
Loading…
Reference in a new issue