def set_lifecycle(bucket_name, lifecycle):
# TODO: check if bucket exists, otherwise return 404-like error
if isinstance(to_str(lifecycle), six.string_types):
lifecycle = xmltodict.parse(lifecycle)
BUCKET_LIFECYCLE[bucket_name] = lifecycle
response = Response()
response.status_code = 200
return response
评论列表
文章目录