Skip to content

Commit

Permalink
Fix FCGI and WSGI scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
liZe committed Jul 1, 2016
1 parent 7a7e671 commit 5b5edaa
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions radicale.fcgi
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ Launch a Radicale FastCGI server according to configuration.
"""

import os
import radicale
from flipflop import WSGIServer
from radicale import Application, config, log


configuration = radicale.config.load([os.environ.get("RADICALE_CONFIG")])
logger = radicale.log.start()
WSGIServer(radicale.Application(configuration, logger)).run()
configuration = config.load([os.environ.get("RADICALE_CONFIG")])
logger = log.start()
WSGIServer(Application(configuration, logger)).run()

8 changes: 4 additions & 4 deletions radicale.wsgi
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ Radicale WSGI file (mod_wsgi and uWSGI compliant).
"""

import os
import radicale
from radicale import Application, config, log


configuration = radicale.config.load([os.environ.get("RADICALE_CONFIG")])
logger = radicale.log.start()
application = radicale.Application(configuration, logger)
configuration = config.load([os.environ.get("RADICALE_CONFIG")])
logger = log.start()
application = Application(configuration, logger)
2 changes: 1 addition & 1 deletion radicale/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def configure_from_file(filename, debug, logger):
def start(name="radicale", filename=None, debug=False):
"""Start the logging according to the configuration."""
logger = logging.getLogger(name)
if os.path.exists(filename):
if filename and os.path.exists(filename):
# Configuration taken from file
configure_from_file(logger, filename, debug)
# Reload config on SIGHUP (UNIX only)
Expand Down

0 comments on commit 5b5edaa

Please sign in to comment.