|
72 | 72 | get_sha256_hexdigest, get_md5_base64digest, Hasher, |
73 | 73 | optimal_part_info, |
74 | 74 | is_valid_bucket_name, PartMetadata, read_full, |
75 | | - is_valid_bucket_notification_config, |
| 75 | + is_valid_bucket_notification_config, is_valid_bucket_policy_name, |
76 | 76 | get_s3_region_from_endpoint, |
77 | 77 | mkdir_p, dump_http, amzprefix_user_metadata, |
78 | 78 | is_supported_header,is_amz_header) |
@@ -382,14 +382,15 @@ def delete_bucket_policy(self, bucket_name): |
382 | 382 | bucket_name=bucket_name, |
383 | 383 | query={"policy": ""}) |
384 | 384 |
|
385 | | - def set_bucket_policy(self, bucket_name, policy): |
| 385 | + def set_bucket_policy(self, bucket_name, policy): |
386 | 386 | """ |
387 | 387 | Set bucket policy of given bucket name. |
388 | 388 |
|
389 | 389 | :param bucket_name: Bucket name. |
390 | | - :param policy: Access policy/ies in JSON format. |
| 390 | + :param policy: Access policy in string. |
391 | 391 | """ |
392 | 392 | is_valid_bucket_name(bucket_name) |
| 393 | + is_valid_bucket_policy_name(policy) |
393 | 394 |
|
394 | 395 | headers = { |
395 | 396 | 'Content-Length': str(len(policy)), |
|
0 commit comments