[Repoze-checkins] r753 - in repoze.trac/trunk: . repoze/trac

Rocky Burt rocky at serverzen.com
Fri Feb 29 15:04:05 UTC 2008


Author: Rocky Burt <rocky at serverzen.com>
Date: Fri Feb 29 10:04:05 2008
New Revision: 753

Log:
- Added egg-info directory to ignores
- dispatch kw args now get submitted to trac's wsgi handling with 'trac.'
  appended, this means now instead of 'path' you need to use 'env_path'

Modified:
   repoze.trac/trunk/   (props changed)
   repoze.trac/trunk/repoze/trac/__init__.py

Modified: repoze.trac/trunk/repoze/trac/__init__.py
==============================================================================
--- repoze.trac/trunk/repoze/trac/__init__.py	(original)
+++ repoze.trac/trunk/repoze/trac/__init__.py	Fri Feb 29 10:04:05 2008
@@ -7,18 +7,23 @@
 from trac.web.main import dispatch_request
 
 class TracApp:
-    def __init__(self, path):
-        self.path = path
+    def __init__(self, environkw):
+        self.environkw = environkw
 
     def __call__(self, environ, start_response):
-        environ['trac.env_path'] = self.path
+        for k, v in self.environkw.items():
+            environ[k] = v
         return dispatch_request(environ, start_response)
 
 def make_trac(global_conig, **kw):
-    path = kw.get('path', None)
+    path = kw.get('env_path', None)
     if path is None:
-        raise ValueError('"path=" required for make_trac setup')
-    return TracApp(path)
+        raise ValueError('"env_path=" required for make_trac setup')
+
+    environkw = {}
+    for k, v in kw.items():
+        environkw['trac.'+k] = v
+    return TracApp(environkw)
 
 here = os.path.abspath(os.path.dirname(__file__))
 


More information about the Repoze-checkins mailing list