From 519a90abdf0ab9a59754bf48eedf97bbe7718fd2 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 12 Jul 2019 09:21:01 +0530 Subject: [PATCH] Ensure we send a mimetype when upload to github --- setup/hosting.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/hosting.py b/setup/hosting.py index a1e209a5a6..4e8851ebec 100644 --- a/setup/hosting.py +++ b/setup/hosting.py @@ -196,7 +196,7 @@ class GitHub(Base): # {{{ ) def do_upload(self, url, path, desc, fname): - mime_type = mimetypes.guess_type(fname)[0] + mime_type = mimetypes.guess_type(fname)[0] or 'application/octet-stream' self.info('Uploading to GitHub: %s (%s)' % (fname, mime_type)) with ReadFileWithProgressReporting(path) as f: return self.requests.post(