diff options
| author | sylvain thenault <sylvain.thenault@logilab.fr> | 2009-02-12 11:44:48 +0100 |
|---|---|---|
| committer | sylvain thenault <sylvain.thenault@logilab.fr> | 2009-02-12 11:44:48 +0100 |
| commit | 2e897be1c4a75bddb99a79ae6eee4e41f264f200 (patch) | |
| tree | b62a3ba4b351db1d790b99ee3f4590a403a8c984 /reporters | |
| parent | 0e067fd4957f5a5f4bed10f01f0545d135531e67 (diff) | |
| download | pylint-2e897be1c4a75bddb99a79ae6eee4e41f264f200.tar.gz | |
fix html reporter to avoid all messages ending in pylint_globals.html when --files-output is set
Diffstat (limited to 'reporters')
| -rw-r--r-- | reporters/html.py | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/reporters/html.py b/reporters/html.py index d25cc2e..2c8832c 100644 --- a/reporters/html.py +++ b/reporters/html.py @@ -12,10 +12,7 @@ # You should have received a copy of the GNU General Public License along with # this program; if not, write to the Free Software Foundation, Inc., # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -"""HTML reporter -""" - -__revision__ = "$Id: html.py,v 1.14 2006-03-08 15:53:41 syt Exp $" +"""HTML reporter""" import sys from cgi import escape @@ -27,8 +24,7 @@ from pylint.reporters import BaseReporter class HTMLReporter(BaseReporter): - """report messages and layouts in HTML - """ + """report messages and layouts in HTML""" __implements__ = IReporter extension = 'html' @@ -45,7 +41,15 @@ class HTMLReporter(BaseReporter): else: sigle = msg_id[0] self.msgs += [sigle, module, obj, str(line), escape(msg)] - + + def set_output(self, output=None): + """set output stream + + messages buffered for old output is processed first""" + if self.out and self.msgs: + self._display(Section()) + BaseReporter.set_output(self, output) + def _display(self, layout): """launch layouts display |
