Implement storage driver for Azure Blob Storage
This commit is contained in:
parent
00ae24cb2f
commit
d488517b36
6 changed files with 536 additions and 1 deletions
|
@ -156,5 +156,12 @@ class LimitingStream(StreamSlice):
|
|||
of bytes. All calls after that limit (if specified) will act as if the file has no additional
|
||||
data.
|
||||
"""
|
||||
def __init__(self, fileobj, read_limit=READ_UNTIL_END):
|
||||
def __init__(self, fileobj, read_limit=READ_UNTIL_END, seekable=True):
|
||||
super(LimitingStream, self).__init__(fileobj, 0, read_limit)
|
||||
self._seekable = seekable
|
||||
|
||||
def seek(self, index, whence=WHENCE_ABSOLUTE):
|
||||
if not self._seekable:
|
||||
raise AttributeError
|
||||
|
||||
super(LimitingStream, self).seek(index, whence)
|
||||
|
|
Reference in a new issue