[New-bugs-announce] [issue17335] FieldStorageClass is messed up

Neal Norwitz report at bugs.python.org
Sat Mar 2 01:34:23 CET 2013


New submission from Neal Norwitz:

This problem goes back to 2.6 at least.

In Lib/cgi.py

    FieldStorageClass = None

    def read_multi(self, environ, keep_blank_values, strict_parsing):
        """Internal: read a part that is itself multipart."""
        ib = self.innerboundary
        if not valid_boundary(ib):
            raise ValueError, 'Invalid boundary in multipart form: %r' % (ib,)
        self.list = []
        if self.qs_on_post:
            for key, value in urlparse.parse_qsl(self.qs_on_post,
                                self.keep_blank_values, self.strict_parsing):
                self.list.append(MiniFieldStorage(key, value))
            FieldStorageClass = None

The set of FieldStorageClass is to a local variable, so a no-op since it's never read.  The class attribute will always be None unless set outside this class (not sure if it is).  It looks like it should just be removed.

----------
messages: 183308
nosy: Neal.Norwitz
priority: normal
severity: normal
status: open
title: FieldStorageClass is messed up
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17335>
_______________________________________


More information about the New-bugs-announce mailing list