You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bloodhound.apache.org by Gary Martin <ga...@wandisco.com> on 2013/04/03 20:18:19 UTC

Re: svn commit: r1464108 - /bloodhound/trunk/trac/trac/web/main.py

On 03/04/13 18:04, gjm@apache.org wrote:
> Author: gjm
> Date: Wed Apr  3 17:04:50 2013
> New Revision: 1464108
>
> URL: http://svn.apache.org/r1464108
> Log:
> catches failure of request_factory in order to allow requires upgrade messages to be sent - #494
>
> Modified:
>      bloodhound/trunk/trac/trac/web/main.py
>
> Modified: bloodhound/trunk/trac/trac/web/main.py
> URL: http://svn.apache.org/viewvc/bloodhound/trunk/trac/trac/web/main.py?rev=1464108&r1=1464107&r2=1464108&view=diff
> ==============================================================================
> --- bloodhound/trunk/trac/trac/web/main.py (original)
> +++ bloodhound/trunk/trac/trac/web/main.py Wed Apr  3 17:04:50 2013
> @@ -466,7 +466,11 @@ def dispatch_request(environ, start_resp
>           env_error = e
>   
>       from trac.hooks import request_factory
> -    factory = request_factory(global_env)
> +    factory = None
> +    try:
> +        factory = request_factory(global_env)
> +    except AttributeError:
> +        pass
>       req = factory().create_request(env, environ, start_response) if factory \
>               else RequestWithSession(environ, start_response)
>       translation.make_activable(lambda: req.locale, env.path if env else None)
>
>

This was a quick tweak to some code that I believe was introduced in the 
multiproduct merge (ticket is 
https://issues.apache.org/bloodhound/ticket/494)

There may be some knock-on effects that I have not taken into account so 
I will look at it again shortly.

Cheers,
     Gary

Re: svn commit: r1464108 - /bloodhound/trunk/trac/trac/web/main.py

Posted by Olemis Lang <ol...@gmail.com>.
On 4/3/13, Gary Martin <ga...@wandisco.com> wrote:
> On 03/04/13 18:04, gjm@apache.org wrote:
>> Author: gjm
>> Date: Wed Apr  3 17:04:50 2013
>> New Revision: 1464108
>>
[...]
>
> This was a quick tweak to some code that I believe was introduced in the
> multiproduct merge

definitely yes.

> (ticket is https://issues.apache.org/bloodhound/ticket/494)
>
> There may be some knock-on effects that I have not taken into account so
> I will look at it again shortly.
>

IMHO feel free to do so ... though current implementation of env
factories should be modified in other ways as part of #441 ...

-- 
Regards,

Olemis.