File: comment_7_3a645a0cd1e4c939b7a4b8a97a0e9b03._comment

package info (click to toggle)
git-annex 5.20141125
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 37,828 kB
  • ctags: 583
  • sloc: haskell: 42,582; sh: 1,080; ansic: 498; makefile: 316; perl: 125
file content (26 lines) | stat: -rw-r--r-- 1,007 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
[[!comment format=mdwn
 username="http://joeyh.name/"
 ip="209.250.56.54"
 subject="comment 7"
 date="2014-10-06T15:23:59Z"
 content="""
Hugo, I didn't write this code, but it looks to me like you could work around the problem by changing line 207 of lib/CommonFunctions.py:

<pre>
diff --git a/lib/CommonFunctions.py b/lib/CommonFunctions.py
index 050b93e..083f5d6 100644
--- a/lib/CommonFunctions.py
+++ b/lib/CommonFunctions.py
@@ -204,7 +204,7 @@ def fetchPage(params={}):
         if get(\"progress\"):
             data = False
             tdata = \"\"
-            totalsize = int(con.headers['content-length'])
+            totalsize = 0
             chunksize = totalsize / 100
             if chunksize < 4096:
                 chunksize = 4096
</pre>

Probably the API used to return a content-length header, and no longer does, or doesn't do so reliably. It does not seem to be used for anything too important -- this change will break git-annex's progress display a little bit, perhaps.
"""]]