Skip to content

Commit

Permalink
Fix flake8
Browse files Browse the repository at this point in the history
Fixes #139
  • Loading branch information
ale-rt committed Jun 26, 2020
1 parent 9729eae commit 47f2b44
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions news/139.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix flake8 [ale-rt]
8 changes: 4 additions & 4 deletions src/plone/recipe/zope2instance/recipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ def build_zope_conf(self):
chameleon_cache = 'CHAMELEON_CACHE {}'.format(chameleon_cache)
if environment_vars and '\n' in environment_vars:
# default case
environment_vars += '\n'.format(chameleon_cache)
environment_vars += '\n'
elif environment_vars:
# handle case of all vars in one line
environment_vars += ' {}'.format(chameleon_cache)
Expand Down Expand Up @@ -717,9 +717,9 @@ def is_rs_option(name):
enable_products=enable_products,
zope_conf_additional=zope_conf_additional,)

zope_conf = '\n'.join([l
for l in zope_conf.splitlines()
if l.rstrip()])
zope_conf = "\n".join(
[line for line in zope_conf.splitlines() if line.rstrip()]
)
zope_conf_path = os.path.join(location, 'etc', 'zope.conf')
with open(zope_conf_path, 'w') as f:
f.write(zope_conf)
Expand Down

0 comments on commit 47f2b44

Please sign in to comment.