Djblets.extensions.TemplateHook applies_to() sandboxing

Review Request #6545 — Created Oct. 31, 2014 and submitted — Latest diff uploaded

Information

Djblets
master
f27a497...

Reviewers

Extensions that create a TemplateHook subclass with a new applies_to function can throw an exception inside Djblets. The part of Djblets that calls that method has been sandboxed.

Now when a TemplateHook subclass's applies_to() function from an extension throws an exception; Djblets logs the error.

Unit test has been written to make sure that applies_to() from a TemplateHook subclass has been called, and when an exception is thrown it gets logged.

The test fails without the sanboxing, and succeeds with it.