Mentions légales du service

Skip to content
Snippets Groups Projects
Commit c522cafc authored by GARNIER Laurent's avatar GARNIER Laurent
Browse files

Update allgo/__init__.py

parent 523ac633
No related branches found
No related tags found
1 merge request!7Jupyter token 2021
...@@ -151,7 +151,7 @@ class Init: ...@@ -151,7 +151,7 @@ class Init:
# Check all methods # Check all methods
# notebook, local_file, env_variable, arg_variable # notebook, local_file, env_variable, arg_variable
if(API_parameters['auth_method'] == 'notebook'): if(API_parameters['auth_method'] == 'notebook'):
if (not API_parameters.get('API_token')): if not 'API_token' in API_paremeters :
API_parameters['API_token'] = secrets.token_hex(16) API_parameters['API_token'] = secrets.token_hex(16)
print('Notebook token created') print('Notebook token created')
elif(API_token_valid): elif(API_token_valid):
...@@ -316,7 +316,7 @@ class App: ...@@ -316,7 +316,7 @@ class App:
:return: :return:
""" """
global API_parameters global API_parameters
AP
headers = {'Authorization': 'Token token={}'.format(API_parameters['API_token'])} headers = {'Authorization': 'Token token={}'.format(API_parameters['API_token'])}
data = {"job[webapp_name]": self.name, data = {"job[webapp_name]": self.name,
"job[webapp_id]": self.name, "job[webapp_id]": self.name,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment