summaryrefslogtreecommitdiffstats
path: root/project.py
diff options
context:
space:
mode:
authorConley Owens <cco3@android.com>2012-03-12 11:25:04 -0700
committerConley Owens <cco3@android.com>2012-03-12 12:13:15 -0700
commit43bda84362b8fd8bb74a81003e8b49cff15ea5ed (patch)
tree6d7a8606c95c460ef85d4352e86e0aa0f053830e /project.py
parent9b017dab46bd5b61f8719a3f2d7ca301ea0f6f69 (diff)
downloadgit-repo-43bda84362b8fd8bb74a81003e8b49cff15ea5ed.tar.gz
Avoid missing content-length header in project.py
Occassionally, the content-length may be missing when using urlib in python 2.6 and 2.7. This change assumes the value of the header is 0 if it doesn't exist Change-Id: Iaf1c8a796bc667823d4d7c30f9b617644b271d00
Diffstat (limited to 'project.py')
-rw-r--r--project.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/project.py b/project.py
index f48472b4..f1a931c6 100644
--- a/project.py
+++ b/project.py
@@ -1529,7 +1529,7 @@ class Project(object):
1529 1529
1530 p = None 1530 p = None
1531 try: 1531 try:
1532 size = r.headers['content-length'] 1532 size = r.headers.get('content-length', 0)
1533 unit = 1 << 10 1533 unit = 1 << 10
1534 1534
1535 if size and not quiet: 1535 if size and not quiet: