pesaply / mplh5canvas

Automatically exported from code.google.com/p/mplh5canvas
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

memorizingfile is missing size argument for readline #8

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Running python single_plot.py, then accessing the plot page in Chromium, I get 
an exception that readline was given 2 arguments but expected just 1.

The file interface specifies that readline() should accept an optional 'size' 
argument, which is actually used by BaseHTTPServer.  

I'm using python 2.7, in a fresh install of Kubuntu Natty.

The fix is just to modify memorizingfile.py:68 to add size: 

    def readline(self,size=None):
        """Override file.readline and memorize the line read."""

        line = self._file.readline(size=size)
        if line and len(self._memorized_lines) < self._max_memorized_lines:
            self._memorized_lines.append(line)
        return line

Original issue reported on code.google.com by RustyCh...@gmail.com on 9 May 2011 at 1:14

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r28.

Original comment by ludwig.s...@gmail.com on 27 May 2011 at 11:55