Small paster related bug and its fix.

Erich Heine <[email protected]> Sat, 4 Apr 2009 23:50:53 -0500
Newsgroups gmane.comp.web.pyblosxom.devel
Message-ID <[email protected]>
Hi all,

I literally just signed up for this list, and I hope I'm not violating any
protocols here...

I had a small problem when trying to get pyblosxom running with paster
serve. I would get a KeyError for config options set only in the blog.ini
file (my config.py was only: py = {} ).  Patch to fix this (against trunk is
included below).

A quick description is that the app_factory was doing a bunch of config
setup, and then passing the resulting dict to PyBlosxomWSGIApp as a
positional parameter. The problem is that class wants env as the first
positional parameter, not config data (that keyword is third...).

Anyway, hope this helps.

Regards,
Erich

------------------------------------------------------------------------------

_______________________________________________
Pyblosxom-devel mailing list
Pyblosxom-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/pyblosxom-devel
paster_fix.patch (text/x-diff, 593 B)
Index: pyblosxom/Pyblosxom/pyblosxom.py
===================================================================
--- pyblosxom/Pyblosxom/pyblosxom.py	(revision 1305)
+++ pyblosxom/Pyblosxom/pyblosxom.py	(working copy)
@@ -509,8 +509,8 @@
     if "configpydir" in conf:
         sys.path.insert(0, conf["configpydir"])
 
-    return cgitb_catcher.make_cgitb_middleware(PyBlosxomWSGIApp(conf),
-                                               global_config)
+    return cgitb_catcher.make_cgitb_middleware(
+                PyBlosxomWSGIApp(configini = conf), global_config)
 
 
 class EnvDict(dict):