File tree 1 file changed +10
-6
lines changed
1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -930,26 +930,28 @@ def cmd_info(args):
930
930
931
931
try :
932
932
policy = s3 .get_policy (uri )
933
- output (u" policy : %s" % policy )
933
+ output (u" Policy : %s" % policy )
934
934
except S3Error as exc :
935
935
# Ignore the exception and don't fail the info
936
936
# if the server doesn't support setting ACLs
937
- if exc .status == 405 :
938
- output (u" policy: Not available: Only the bucket owner can read the policy" )
937
+ if exc .status == 403 :
938
+ output (u" Policy: Not available: GetPolicy permission is needed to read the policy" )
939
+ elif exc .status == 405 :
940
+ output (u" Policy: Not available: Only the bucket owner can read the policy" )
939
941
elif exc .status not in [404 , 501 ]:
940
942
raise exc
941
943
else :
942
- output (u" policy : none" )
944
+ output (u" Policy : none" )
943
945
944
946
try :
945
947
cors = s3 .get_cors (uri )
946
- output (u" cors : %s" % cors )
948
+ output (u" CORS : %s" % cors )
947
949
except S3Error as exc :
948
950
# Ignore the exception and don't fail the info
949
951
# if the server doesn't support setting ACLs
950
952
if exc .status not in [404 , 501 ]:
951
953
raise exc
952
- output (u" cors : none" )
954
+ output (u" CORS : none" )
953
955
954
956
try :
955
957
acl = s3 .get_acl (uri )
@@ -963,6 +965,8 @@ def cmd_info(args):
963
965
# if the server doesn't support setting ACLs
964
966
if exc .status not in [404 , 501 ]:
965
967
raise exc
968
+ else :
969
+ output (u" ACL: none" )
966
970
967
971
if uri .has_object ():
968
972
# Temporary hack for performance + python3 compatibility
You can’t perform that action at this time.
0 commit comments