beforehand we didn't accept the seek() whence param, which
failed with boto 2.4.0.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
import string
import socket
import ssl
+import os
from httplib import HTTPConnection, HTTPSConnection
from urlparse import urlparse
self.char = char
self.interrupt = interrupt
- def seek(self, offset):
- self.offset = offset
+ def seek(self, offset, whence=os.SEEK_SET):
+ if whence == os.SEEK_SET:
+ self.offset = offset
+ elif whence == os.SEEK_END:
+ self.offset = self.size + offset;
+ elif whence == os.SEEK_CUR:
+ self.offset += offset
def tell(self):
return self.offset