Skip to content

Commit

Permalink
When pid-path is not given use a sensible default, the current direct…
Browse files Browse the repository at this point in the history
…ory.
  • Loading branch information
brosner committed Jul 11, 2008
1 parent dbd118a commit 0b4686c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions bosnowsgi.py
Expand Up @@ -156,8 +156,12 @@ def main():
server_config = config["servers"][name]
except KeyError:
sys.exit("no server named '%s'" % name)
params["pidfile"] = os.path.join(os.path.expanduser(config["pid-path"]),
"%s.pid" % name)
pid_path = config.get("pid-path")
if not pid_path:
root_pid_path = "."
else:
root_pid_path = os.path.expanduser(config["pid-path"])
params["pidfile"] = os.path.join(root_pid_path, "%s.pid" % name)
try:
server = load_wsgi_server(name, config=server_config, **params)
except ImproperlyConfigured, ex:
Expand Down

0 comments on commit 0b4686c

Please sign in to comment.