Skip to content

Commit

Permalink
webcompat#710 Adjusts to TypeError. e not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
karlcow committed Mar 2, 2016
1 parent 95d831d commit 3ab1512
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions webcompat/api/uploads.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ def to_image_object(self, imagedata):
# Chop off 'data:image/.+;base64,' before decoding
imagedata = re.sub('^data:image/.+;base64,', '', imagedata)
return Image.open(BytesIO(base64.b64decode(imagedata)))
raise IOError('Not a valid image format')
except IOError as e:
raise TypeError('TypeError: Not a valid image format')
except TypeError:
# Not a valid format
abort(415)

Expand Down

0 comments on commit 3ab1512

Please sign in to comment.