Skip to content

Commit

Permalink
#2279 better exception message: show what format we actually got
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@22515 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Apr 23, 2019
1 parent 761d351 commit 89efa92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/xpra/codecs/pillow/decoder.py
Expand Up @@ -61,7 +61,7 @@ def get_image_type(data):
def open_only(data, types=("png", "jpeg", "webp")):
itype = get_image_type(data)
if itype not in types:
raise Exception("invalid data, not recognized as %s" % csv(types))
raise Exception("invalid data: %s, not recognized as %s" % ((itype or "unknown"), csv(types)))
buf = BytesIO(data)
return Image.open(buf)

Expand Down

0 comments on commit 89efa92

Please sign in to comment.