summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-09-21 20:06:18 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-09-21 20:06:18 +0200
commitbbfce1b43d183cdccbe6f9a189098091f9d4a251 (patch)
tree018be1c35030e45ee660f969a31b0ff62d01bb45
parentf3d513b378fcc094255264de0c73f96fac461b68 (diff)
downloadsamba-bbfce1b43d183cdccbe6f9a189098091f9d4a251.tar.gz
samba-bbfce1b43d183cdccbe6f9a189098091f9d4a251.tar.bz2
samba-bbfce1b43d183cdccbe6f9a189098091f9d4a251.zip
Allow SWAT to be run outside of smbd.
-rw-r--r--source4/web_server/swat/__init__.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/web_server/swat/__init__.py b/source4/web_server/swat/__init__.py
index 8229d15a3c..d434bb260b 100644
--- a/source4/web_server/swat/__init__.py
+++ b/source4/web_server/swat/__init__.py
@@ -32,3 +32,8 @@ def __call__(environ, start_response):
yield '</table>\n'
+if __name__ == '__main__':
+ from wsgiref import simple_server
+ httpd = simple_server.make_server('localhost', 8090, __call__)
+ print "Serving HTTP on port 8090..."
+ httpd.serve_forever()