Merge pull request #2902 from coreos-inc/joseph.schorr/QS-51/azure-blob-store

Add support for Azure Blob Storage
This commit is contained in:
josephschorr 2018-02-07 11:34:29 -05:00 committed by GitHub
commit 846deb75fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 549 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)