Skip to content

Commit

Permalink
add etag_stream
Browse files Browse the repository at this point in the history
  • Loading branch information
forrest-mao committed Jul 16, 2015
1 parent b345f01 commit aca73ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions qiniu/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def _sha1(data):
return h.digest()


def _etag(input_stream):
def etag_stream(input_stream):
"""计算输入流的etag:
etag规格参考 http://developer.qiniu.com/docs/v6/api/overview/appendix.html#qiniu-etag
Expand Down Expand Up @@ -137,7 +137,7 @@ def etag(filePath):
输入文件的etag值
"""
with open(filePath, 'rb') as f:
return _etag(f)
return etag_stream(f)


def entry(bucket, key):
Expand Down

0 comments on commit aca73ad

Please sign in to comment.