diff options
| author | Alex Gaynor <alex.gaynor@rd.io> | 2012-09-07 15:06:23 -0400 |
|---|---|---|
| committer | Alex Gaynor <alex.gaynor@rd.io> | 2012-09-07 15:08:07 -0400 |
| commit | 335a9f9cf1e2f40679e91cf42cfd0e636885a397 (patch) | |
| tree | 1fa3e8a43e1bd0d884e5f810f229a3c35ed4381d /django/http | |
| parent | 257c4011cb887524048acb8796b130761617d195 (diff) | |
Removed many uses of bare "except:", which were either going to a) silence real issues, or b) were impossible to hit.
Diffstat (limited to 'django/http')
| -rw-r--r-- | django/http/multipartparser.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/django/http/multipartparser.py b/django/http/multipartparser.py index e76a4f4208..40aefd6e9d 100644 --- a/django/http/multipartparser.py +++ b/django/http/multipartparser.py @@ -68,11 +68,10 @@ class MultiPartParser(object): if not boundary or not cgi.valid_boundary(boundary): raise MultiPartParserError('Invalid boundary in multipart: %s' % boundary) - # Content-Length should contain the length of the body we are about # to receive. try: - content_length = int(META.get('HTTP_CONTENT_LENGTH', META.get('CONTENT_LENGTH',0))) + content_length = int(META.get('HTTP_CONTENT_LENGTH', META.get('CONTENT_LENGTH', 0))) except (ValueError, TypeError): content_length = 0 @@ -178,7 +177,7 @@ class MultiPartParser(object): content_type = meta_data.get('content-type', ('',))[0].strip() try: - charset = meta_data.get('content-type', (0,{}))[1].get('charset', None) + charset = meta_data.get('content-type', (0, {}))[1].get('charset', None) except: charset = None |
