diff options
| author | Robert Collins <robertc@robertcollins.net> | 2011-05-02 11:17:36 +1200 |
|---|---|---|
| committer | Robert Collins <robertc@robertcollins.net> | 2011-05-02 11:17:36 +1200 |
| commit | 29334d4de556ca329e89fb4a34f97c63c095b135 (patch) | |
| tree | 58e3819832842f57bc9c49364ae23d45b7f412dd /python/subunit/details.py | |
| parent | 098f465f5547aa75379e4e8b0b067d22fa7f34b3 (diff) | |
| download | subunit-git-29334d4de556ca329e89fb4a34f97c63c095b135.tar.gz | |
Fix thinko in addSuccess refactoring.
Diffstat (limited to 'python/subunit/details.py')
| -rw-r--r-- | python/subunit/details.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/python/subunit/details.py b/python/subunit/details.py index 35bc88e..9e5e005 100644 --- a/python/subunit/details.py +++ b/python/subunit/details.py @@ -85,7 +85,10 @@ class MultipartDetailsParser(DetailsParser): return # TODO error handling field, value = line[:-1].decode('utf8').split(' ', 1) - main, sub = value.split('/') + try: + main, sub = value.split('/') + except ValueError: + raise ValueError("Invalid MIME type %r" % value) self._content_type = content_type.ContentType(main, sub) self._parse_state = self._get_name |
