Re: tags plugin

will kahn-greene <[email protected]> Tue, 04 May 2010 09:54:20 -0400
Newsgroups gmane.comp.web.pyblosxom.devel
Message-ID <[email protected]>
Whoops--that's my fault.  You're right--this should be a KeyError and
not an AttributeError.

I'm +1 on your suggested fix.


On 05/04/2010 05:38 AM, Sebastian Spaeth wrote:
> 
> The current tags plugin in git uses this code:
> 
>     try:
>         flavour = form["flav"].value
>     except AttributeError:
>         flavour = config.get("default_flavour", "html")
>     baseurl = config.get("base_url", "")
>     trigger = config.get("tags_trigger", "tag")
> 
> However, it raises KeyError, not AttributeError for me when no
> ?flav=html is appended, crashing the cgi process.
> 
> Is AttributeError really the right thing to use here? Otherwise let's
> except KeyError only. THis fixes it and makes my blog work.
> 
> THanks for applying or do you want me to push? (or provide a patch to
> pull?)
> 
> Sebastian
> 
> P.S. I think both fixes from today should still go in before we declare
> 1.5 as ready.
> 
> 
> 
> ------------------------------------------------------------------------------
> 
> 
> 
> _______________________________________________
> Pyblosxom-devel mailing list
> Pyblosxom-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/pyblosxom-devel

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