Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.

Fix a problem when you put more than one option in buildout file. #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions shaunsephton/recipe/uwsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def __init__(self, buildout, name, options):
elif key.startswith('_'):
continue
self.conf[key] = options.get(key, None)

self.options = options

def download_release(self):
Expand Down Expand Up @@ -144,8 +144,11 @@ def create_conf_xml(self):
if value.lower() == 'true':
conf += "<%s/>\n" % key
elif value and value.lower() != 'false':
conf += "<%s>%s</%s>\n" % (key, value, key)

if '\n' in value:
for subvalue in value.split('\n'):
conf += "<%s>%s</%s>\n" % (key, subvalue, key)
else:
conf += "<%s>%s</%s>\n" % (key, value, key)

requirements, ws = self.egg.working_set()
paths = zc.buildout.easy_install._get_path(ws, self.get_extra_paths())
Expand Down Expand Up @@ -177,9 +180,9 @@ def install(self):

# Create uWSGI conf xml.
paths.append(self.create_conf_xml())

return paths

def update(self):
# Create uWSGI conf xml - the egg set might have changed even if
# the uwsgi section is unchanged so it's safer to re-generate the xml
Expand Down