Commit 082cccdb authored by maruel@chromium.org's avatar maruel@chromium.org

Partial update of upload.py with r660 patch.

Make json files known as a text mimetype so that they can be seen in reviews.

Original review at http://codereview.appspot.com/4133046/

Also make sure that the copy in third_party and in git_cl are the same. I'll
remove the copy in git_cl in a later change.

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@74116 0039d316-1c4b-4281-b951-d872f2087c98
parent fdcc9f7f
......@@ -90,9 +90,9 @@ VCS_UNKNOWN = "Unknown"
# whitelist for non-binary filetypes which do not start with "text/"
# .mm (Objective-C) shows up as application/x-freemind on my Linux box.
TEXT_MIMETYPES = ['application/javascript', 'application/x-javascript',
'application/xml', 'application/x-freemind',
'application/x-sh']
TEXT_MIMETYPES = ['application/javascript', 'application/json',
'application/x-javascript', 'application/xml',
'application/x-freemind', 'application/x-sh']
VCS_ABBREVIATIONS = {
VCS_MERCURIAL.lower(): VCS_MERCURIAL,
......@@ -416,6 +416,14 @@ class AbstractRpcServer(object):
url = e.info()["location"]
else:
raise
except urllib2.URLError, e:
reason = getattr(e, 'reason', None)
if isinstance(reason, str) and reason.find("110") != -1:
# Connection timeout error.
if tries <= 3:
# Try again.
continue
raise
finally:
socket.setdefaulttimeout(old_timeout)
......
......@@ -90,9 +90,9 @@ VCS_UNKNOWN = "Unknown"
# whitelist for non-binary filetypes which do not start with "text/"
# .mm (Objective-C) shows up as application/x-freemind on my Linux box.
TEXT_MIMETYPES = ['application/javascript', 'application/x-javascript',
'application/xml', 'application/x-freemind',
'application/x-sh']
TEXT_MIMETYPES = ['application/javascript', 'application/json',
'application/x-javascript', 'application/xml',
'application/x-freemind', 'application/x-sh']
VCS_ABBREVIATIONS = {
VCS_MERCURIAL.lower(): VCS_MERCURIAL,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment