Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Prevent a TypeError when Content-Type is empty

  • Loading branch information...
commit 52127187ac6cb68341b1fea51d6653ff791f7466 1 parent fd61e80
David Ehrmann ehrmann authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  r2/r2/lib/media.py
2  r2/r2/lib/media.py
View
@@ -383,7 +383,7 @@ def _find_thumbnail_image(self):
content_type, content = _fetch_url(self.url)
# if it's an image. it's pretty easy to guess what we should thumbnail.
- if "image" in content_type:
+ if content_type and "image" in content_type and content:
return self.url
if content_type and "html" in content_type and content:
Please sign in to comment.
Something went wrong with that request. Please try again.