Skip to content
Myr

Make DebugFilesKeyError.__str__ return str on 3.x

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Daniel Neuhäuser · committed by Daniel Neuhäuser · parent 3f80b0f · Browse files · 1 file+3 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−1 removed

  • other:+3 added−1 removed

1 file+3 added−1 removed

modified:flask/debughelpers.py+3 added-1 removed
6 unmodified lines
78 :copyright: (c) 2011 by Armin Ronacher.9 :license: BSD, see LICENSE for more details.10"""11from flask._compat import implements_to_string121314class UnexpectedUnicodeError(AssertionError, UnicodeError):15 """Raised in places where we want some better error reporting for16 unexpected unicode or binary data.17 """181920@implements_to_string21class DebugFilesKeyError(KeyError, AssertionError):22 """Raised from request.files during debugging. The idea is that it can23 provide a better error message than just a generic KeyError/BadRequest.24 """
9 unmodified lines
34 if form_matches:35 buf.append('\n\nThe browser instead transmitted some file names. '36 'This was submitted: %s' % ', '.join('"%s"' % x37 for x in form_matches))36 self.msg = ''.join(buf).encode('utf-8')38 self.msg = ''.join(buf)3940 def __str__(self):41 return self.msg42
45 unmodified lines