~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to loggerhead/controllers/error_ui.py

  • Committer: Michael Hudson
  • Date: 2009-02-19 01:24:20 UTC
  • mto: This revision was merged to the branch mainline in revision 271.
  • Revision ID: michael.hudson@canonical.com-20090219012420-c6s1j3etl2t4r7wa
defer loading of plugins until after we've set up the logging

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
    template_path = 'loggerhead.templates.error'
29
29
 
30
30
    def __init__(self, branch, exc_info):
31
 
        super(ErrorUI, self).__init__(branch, lambda: None)
 
31
        super(ErrorUI, self).__init__(branch, lambda:None)
32
32
        self.exc_info = exc_info
33
33
 
34
34
    def get_values(self, path, kwargs, response):
35
35
        exc_type, exc_object, exc_tb = self.exc_info
36
36
        description = StringIO()
37
37
        traceback.print_exception(exc_type, exc_object, None, file=description)
38
 
        directory_breadcrumbs = util.directory_breadcrumbs(
39
 
            self._branch.friendly_name, self._branch.is_root, 'changes')
 
38
        directory_breadcrumbs = (
 
39
            util.directory_breadcrumbs(
 
40
                self._branch.friendly_name,
 
41
                self._branch.is_root,
 
42
                'changes'))
40
43
        return {
41
44
            'branch': self._branch,
42
45
            'error_title': ('An unexpected error occurred while'
43
 
                            'processing the request:'),
 
46
                            'proccesing the request:'),
44
47
            'error_description': description.getvalue(),
45
48
            'directory_breadcrumbs': directory_breadcrumbs,
46
49
        }