summaryrefslogtreecommitdiffstats
path: root/project.py
diff options
context:
space:
mode:
Diffstat (limited to 'project.py')
-rw-r--r--project.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/project.py b/project.py
index 68c1c687..35dbafd4 100644
--- a/project.py
+++ b/project.py
@@ -1564,7 +1564,7 @@ class Project(object):
1564 try: 1564 try:
1565 req = urllib2.Request(srcUrl) 1565 req = urllib2.Request(srcUrl)
1566 if pos > 0: 1566 if pos > 0:
1567 req.add_header('Range', 'bytes=%d-' % pos) 1567 req.add_header('Range', 'bytes=%d-' % (pos,))
1568 1568
1569 try: 1569 try:
1570 r = urllib2.urlopen(req) 1570 r = urllib2.urlopen(req)
@@ -1583,7 +1583,7 @@ class Project(object):
1583 msg = e.read() 1583 msg = e.read()
1584 if len(msg) > 0 and msg[-1] == '\n': 1584 if len(msg) > 0 and msg[-1] == '\n':
1585 msg = msg[0:-1] 1585 msg = msg[0:-1]
1586 msg = ' (%s)' % msg 1586 msg = ' (%s)' % (msg,)
1587 except: 1587 except:
1588 msg = '' 1588 msg = ''
1589 else: 1589 else:
@@ -1601,7 +1601,7 @@ class Project(object):
1601 1601
1602 p = None 1602 p = None
1603 try: 1603 try:
1604 size = r.headers.get('content-length', 0) 1604 size = pos + r.headers.get('content-length', 0)
1605 unit = 1 << 10 1605 unit = 1 << 10
1606 1606
1607 if size and not quiet: 1607 if size and not quiet:
@@ -1611,7 +1611,7 @@ class Project(object):
1611 else: 1611 else:
1612 desc = 'KB' 1612 desc = 'KB'
1613 p = Progress( 1613 p = Progress(
1614 'Downloading %s' % self.relpath, 1614 'Downloading %s' % (self.relpath,),
1615 int(size) / unit, 1615 int(size) / unit,
1616 units=desc) 1616 units=desc)
1617 if pos > 0: 1617 if pos > 0: