]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
lock server: configure for apache with mod_wsgi
authorJosh Durgin <josh.durgin@dreamhost.com>
Wed, 20 Jul 2011 01:37:05 +0000 (18:37 -0700)
committerJosh Durgin <josh.durgin@dreamhost.com>
Wed, 20 Jul 2011 01:37:05 +0000 (18:37 -0700)
teuthology/locker/locker.py

index 93067cf84e79afb9994641fa39dd87acc85c0c8c..7de222d11b25cc64b068db6266ff8fca9ea00da5 100755 (executable)
@@ -1,7 +1,13 @@
 #!/usr/bin/env python
 
+import os
+import sys
 import web
 
+abspath = os.path.dirname(__file__)
+if abspath not in sys.path:
+    sys.path.append(abspath)
+
 from api import Lock, MachineLock
 
 urls = (
@@ -10,6 +16,4 @@ urls = (
     )
 
 app = web.application(urls, globals())
-
-if __name__ == "__main__":
-    app.run()
+application = app.wsgifunc()