MCPcopy Create free account
hub / github.com/s3tools/s3cmd / object_info

Method object_info

S3/S3.py:1117–1130  ·  view source on GitHub ↗
(self, uri)

Source from the content-addressed store, hash-verified

1115 return response_copy
1116
1117 def object_info(self, uri):
1118 request = self.create_request("OBJECT_HEAD", uri=uri)
1119 try:
1120 response = self.send_request(request)
1121 except S3Error as exc:
1122 # A HEAD request will not have body, even in the case of an error
1123 # so we can't get the usual XML error content.
1124 # Add fake similar content in such a case
1125 if exc.status == 404 and not exc.code:
1126 exc.code = 'NoSuchKey'
1127 exc.message = 'The specified key does not exist.'
1128 exc.resource = uri
1129 raise exc
1130 return response
1131
1132 def get_acl(self, uri):
1133 if uri.has_object():

Callers 3

object_putMethod · 0.95
object_copyMethod · 0.95
_get_remote_attribsFunction · 0.80

Calls 2

create_requestMethod · 0.95
send_requestMethod · 0.95

Tested by

no test coverage detected