Implement storage driver for Azure Blob Storage

This commit is contained in:
Joseph Schorr 2017-11-03 17:30:15 -04:00 committed by Joseph Schorr
parent 00ae24cb2f
commit d488517b36
6 changed files with 536 additions and 1 deletions

View file

@ -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)