diff options
| author | ianb <devnull@localhost> | 2005-11-05 05:04:09 +0000 |
|---|---|---|
| committer | ianb <devnull@localhost> | 2005-11-05 05:04:09 +0000 |
| commit | 941e510b240b63153ab4c2be2a0e1c767c249696 (patch) | |
| tree | 3bba9db667ab289ff9999549bbd9d39fbcb25a8e /paste/exceptions | |
| parent | f4bd738b1cdba4a11e64773a3d4d016cb8e08fa8 (diff) | |
| download | paste-941e510b240b63153ab4c2be2a0e1c767c249696.tar.gz | |
Don't show extra data in the expandable full traceback (since it's already shown in the short traceback)
Diffstat (limited to 'paste/exceptions')
| -rw-r--r-- | paste/exceptions/formatter.py | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/paste/exceptions/formatter.py b/paste/exceptions/formatter.py index e47d73d..5bc5dd4 100644 --- a/paste/exceptions/formatter.py +++ b/paste/exceptions/formatter.py @@ -20,21 +20,24 @@ class AbstractFormatter: def __init__(self, show_hidden_frames=False, include_reusable=True, + show_extra_data=True, trim_source_paths=()): self.show_hidden_frames = show_hidden_frames self.trim_source_paths = trim_source_paths self.include_reusable = include_reusable + self.show_extra_data = show_extra_data def format_collected_data(self, exc_data): general_data = {} - for name, value_list in exc_data.extra_data.items(): - if isinstance(name, tuple): - importance, title = name - else: - importance, title = 'normal', name - for value in value_list: - general_data[(importance, name)] = self.format_extra_data( - importance, title, value) + if self.show_extra_data: + for name, value_list in exc_data.extra_data.items(): + if isinstance(name, tuple): + importance, title = name + else: + importance, title = 'normal', name + for value in value_list: + general_data[(importance, name)] = self.format_extra_data( + importance, title, value) lines = [] frames = self.filter_frames(exc_data.frames) for frame in frames: @@ -455,6 +458,7 @@ def format_html(exc_data, include_hidden_frames=False, **ops): # @@: This should have a way of seeing if the previous traceback # was actually trimmed at all ops['include_reusable'] = False + ops['show_extra_data'] = False long_er = format_html(exc_data, show_hidden_frames=True, **ops) return """ %s |
