Skip to content

Commit

Permalink
Bump to 0.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
harshavardhana committed Jul 23, 2015
1 parent d7e0e1b commit 12a9185
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion minio/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# (major, minor, micro, alpha/beta/rc/final, #)
# (1, 1, 2, 'alpha', 0) => "1.1.2.dev"
# (1, 2, 0, 'beta', 2) => "1.2b2"
version_info = (0, 2, 2, 'alpha', 0)
version_info = (0, 2, 2, 'final', 0)

def get_version():
" Returns a PEP 386-compliant version number from version_info. "
Expand Down
2 changes: 1 addition & 1 deletion minio/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def get_sha256(content):
hasher.update(content)
return hasher.digest()

def get_md5(cntoent):
def get_md5(content):
"""
calculate md5 for given content
"""
Expand Down
15 changes: 8 additions & 7 deletions minio/minio.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,8 @@ def drop_all_incomplete_uploads(self, bucket):
# check bucket
is_valid_bucket_name(bucket)

uploads = ListIncompleteUploads(self._http, self._endpoint_url, bucket, None,
uploads = ListIncompleteUploads(self._http, self._endpoint_url,
bucket, None,
access_key=self._access_key,
secret_key=self._secret_key)

Expand Down Expand Up @@ -383,20 +384,20 @@ def get_partial_object(self, bucket, key, offset=0, length=0):

return DataStreamer(response)

def put_object(self, bucket, key, data, length=0,
def put_object(self, bucket, key, length, data,
content_type="application/octet-stream"):
"""
Add a new object to the object storage server.
Data can either be a string, byte array, or reader (e.g. open('foo'))
Examples:
minio.put('foo', 'bar', 'hello world', 11)
minio.put('foo', 'bar', 11, 'hello world')
minio.put('foo', 'bar', b'hello world', 11, 'text/plain')
minio.put('foo', 'bar', 11, b'hello world', 'text/plain')
with open('hello.txt', 'rb') as data:
minio.put('foo', 'bar', b'hello world', 11, 'text/plain')
minio.put('foo', 'bar', 11, b'hello world', 'text/plain')
:param bucket: Bucket of new object.
:param key: Key of new object.
Expand Down Expand Up @@ -461,8 +462,8 @@ def list_objects(self, bucket, prefix=None, recursive=False):
:return: An iterator of objects in alphabetical order.
"""
is_valid_bucket_name(bucket)
return ListObjectsIterator(self._http, self._endpoint_url, bucket, prefix,
recursive, self._access_key,
return ListObjectsIterator(self._http, self._endpoint_url, bucket,
prefix, recursive, self._access_key,
self._secret_key)

def stat_object(self, bucket, key):
Expand Down
2 changes: 1 addition & 1 deletion minio/xml_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ def generate_complete_multipart_upload(etags):
etag.text = etags[i]
data = BytesIO()
ElementTree.ElementTree(root).write(data, encoding=None, xml_declaration=False)
return data.getvalue()
return data.getvalue()

0 comments on commit 12a9185

Please sign in to comment.