abs path fix
This commit is contained in:
parent
0e1b09cc32
commit
a6edbfc4ff
1 changed files with 2 additions and 2 deletions
4
main.py
4
main.py
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue