|
|
|
@ -30,12 +30,12 @@ def generate(api_client):
|
|
|
|
|
all_users = api_client.list("localemail/users")
|
|
|
|
|
# Création de l'environnement Jinja
|
|
|
|
|
env = Environment(loader=FileSystemLoader('.'))
|
|
|
|
|
template = env.get_template('templates/list')
|
|
|
|
|
template = env.get_template(path+'\templates/list')
|
|
|
|
|
aliases_rendered = template.render(data=all_users)
|
|
|
|
|
|
|
|
|
|
fichier = open(path+'/generated/aliases','w')
|
|
|
|
|
|
|
|
|
|
if os.path.isfile('aliases_local'): # if a local aliases file exist, add it's content at the beginning
|
|
|
|
|
if os.path.isfile(path+'/aliases_local'): # if a local aliases file exist, add it's content at the beginning
|
|
|
|
|
local = open(path+'/aliases_local','r')
|
|
|
|
|
for line in local.readlines():
|
|
|
|
|
fichier.write(line)
|
|
|
|
|