summaryrefslogtreecommitdiff
path: root/cherrypy/test/modpy.py
diff options
context:
space:
mode:
authorGustavo Picon <tabo@tabo.pe>2012-04-03 00:02:27 -0500
committerGustavo Picon <tabo@tabo.pe>2012-04-03 00:02:27 -0500
commit0d9bf9db6e6a12dc1a94c0153723f67d33e57673 (patch)
tree23e0b1a01a9515e833f7f7c83013dfc2262c46bd /cherrypy/test/modpy.py
parentef56af7d85746127e38b3d37c2c413e72d42a401 (diff)
downloadcherrypy-git-0d9bf9db6e6a12dc1a94c0153723f67d33e57673.tar.gz
Removed trailing whitespace from the codebase.
sed -i '' -e 's/ *$//' `find cherrypy -name '*.py'`
Diffstat (limited to 'cherrypy/test/modpy.py')
-rw-r--r--cherrypy/test/modpy.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/cherrypy/test/modpy.py b/cherrypy/test/modpy.py
index 519571fc..70f7ad43 100644
--- a/cherrypy/test/modpy.py
+++ b/cherrypy/test/modpy.py
@@ -92,19 +92,19 @@ PythonDebug On
"""
class ModPythonSupervisor(helper.Supervisor):
-
+
using_apache = True
using_wsgi = False
template = None
-
+
def __str__(self):
return "ModPython Server on %s:%s" % (self.host, self.port)
-
+
def start(self, modulename):
mpconf = CONF_PATH
if not os.path.isabs(mpconf):
mpconf = os.path.join(curdir, mpconf)
-
+
f = open(mpconf, 'wb')
try:
f.write(self.template %
@@ -112,11 +112,11 @@ class ModPythonSupervisor(helper.Supervisor):
'host': self.host})
finally:
f.close()
-
+
result = read_process(APACHE_PATH, "-k start -f %s" % mpconf)
if result:
print(result)
-
+
def stop(self):
"""Gracefully shutdown a server that is serving forever."""
read_process(APACHE_PATH, "-k stop")
@@ -128,18 +128,18 @@ def wsgisetup(req):
if not loaded:
loaded = True
options = req.get_options()
-
+
import cherrypy
cherrypy.config.update({
"log.error_file": os.path.join(curdir, "test.log"),
"environment": "test_suite",
"server.socket_host": options['socket_host'],
})
-
+
modname = options['testmod']
mod = __import__(modname, globals(), locals(), [''])
mod.setup_server()
-
+
cherrypy.server.unsubscribe()
cherrypy.engine.start()
from mod_python import apache
@@ -151,7 +151,7 @@ def cpmodpysetup(req):
if not loaded:
loaded = True
options = req.get_options()
-
+
import cherrypy
cherrypy.config.update({
"log.error_file": os.path.join(curdir, "test.log"),