Skip to content

Commit

Permalink
Merge pull request kytos#403 from macartur/fix_conf_path
Browse files Browse the repository at this point in the history
Fixing template prefix when BASE_ENV is '/'
  • Loading branch information
beraldoleal committed May 19, 2017
2 parents 7224f66 + c5b2947 commit 781c926
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion etc/kytos/kytos.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ daemon = False
debug = False

# Logging config file. Please specify the full path of logging config file.
logging = {{prefix}}/etc/kytos/logging.ini
logging = {{ prefix }}/etc/kytos/logging.ini

listen = 0.0.0.0

Expand Down
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,9 @@ def generate_file_from_template(cls, templates,
"""
from jinja2 import Template

if kwargs.get('prefix').endswith('/'):
kwargs['prefix'] = kwargs['prefix'][:-1]

cls.create_paths()
for path in templates:
with open(path, 'r', encoding='utf-8') as src_file:
Expand Down

0 comments on commit 781c926

Please sign in to comment.