]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/blobdiff - src/allmydata/scripts/common_http.py
Since we now require Python 2.5, we can use os.SEEK_END.
[tahoe-lafs/tahoe-lafs.git] / src / allmydata / scripts / common_http.py
index 9ceb7a799513e9ad25ecf7545d3ed350f9057e31..66a6291cb5497e3ec89a60a990a5d2917525d860 100644 (file)
@@ -1,4 +1,5 @@
 
+import os
 from cStringIO import StringIO
 import urlparse, httplib
 import allmydata # for __full_version__
@@ -53,7 +54,7 @@ def do_http(method, url, body=""):
     c.putheader("Connection", "close")
 
     old = body.tell()
-    body.seek(0, 2)
+    body.seek(0, os.SEEK_END)
     length = body.tell()
     body.seek(old)
     c.putheader("Content-Length", str(length))