Anonymous committed 56532fa Draft

0.8dev: Fixed unbound local variable errors when exception is raised. Refs #800.

Patch by Olemis Lang.

Comments (0)

Files changed (1)


     # Load handler for environment lookup and instantiation of request objects
     from trac.hooks import load_bootstrap_handler
-    bootstrap = load_bootstrap_handler(environ['trac.bootstrap_handler'],
-                                       environ.get('wsgi.errors'))
+    bootstrap_ep = environ['trac.bootstrap_handler']
+    bootstrap = load_bootstrap_handler(bootstrap_ep, environ.get('wsgi.errors'))
     # Determine the environment
             req = bootstrap.create_request(env, environ, start_response) \
                 if env is not None else Request(environ, start_response)
-        except Exception:
+        except Exception, e:
             log = environ.get('wsgi.errors')
             if log:
                 log.write("[FAIL] [Trac] Entry point '%s' "