new url
This commit is contained in:
parent
3c527da97b
commit
afdf049a26
|
@ -10,8 +10,8 @@ from cucchiaiata.i18n import _
|
|||
|
||||
def main():
|
||||
try:
|
||||
if argv[1] in ['session.server.configure',
|
||||
'session.servermodel.configure']:
|
||||
if argv[1] in ['setting.session.server.configure',
|
||||
'setting.session.servermodel.configure']:
|
||||
Configuration().get()
|
||||
else:
|
||||
parser = Parser()
|
||||
|
|
|
@ -41,7 +41,7 @@ class Common:
|
|||
headers = {'Authorization':'Bearer {}'.format(token)}
|
||||
req = get(url,
|
||||
headers=headers,
|
||||
verify=False)
|
||||
verify=config.allow_insecure_https)
|
||||
code = req.status_code
|
||||
if code != 200:
|
||||
raise Exception(self.get_error_from_http(req))
|
||||
|
@ -62,4 +62,4 @@ def send_data(message: str,
|
|||
if 'reason' in response['error']['kwargs']:
|
||||
raise Exception("{}".format(response['error']['kwargs']['reason']))
|
||||
raise Exception('erreur inconnue')
|
||||
return(response['response'])
|
||||
return response['response']
|
||||
|
|
|
@ -25,11 +25,11 @@ class ConfigAPI(Config):
|
|||
|
||||
class Configuration(Common):
|
||||
def configure_server(self):
|
||||
if self.message == 'session.server.configure':
|
||||
if self.message == 'setting.session.server.configure':
|
||||
type = 'server'
|
||||
else:
|
||||
type = 'servermodel'
|
||||
url = '{}/config/{}/{}'.format(self.cucchiaiata_config.remote_url,
|
||||
url = '{}/setting/{}/{}'.format(self.cucchiaiata_config.remote_url,
|
||||
type,
|
||||
self.session_id)
|
||||
tconfig = self.remote_json_to_config(url,
|
||||
|
|
Loading…
Reference in New Issue