Skip to content

Commit dc2d01f

Browse files
committed
removed some more unnecessary checks based on the feedback
1 parent 21c4bf0 commit dc2d01f

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

s3cmd

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2174,11 +2174,11 @@ def cmd_sync(args):
21742174
def cmd_getacl(args):
21752175
cfg = Config()
21762176
s3 = S3(cfg)
2177-
if len(args) != 1:
2178-
raise ParameterError("Too few parameters! Expected: <bucket>")
2179-
if not S3Uri(args[0]).has_bucket():
2180-
raise ParameterError("Invalid bucket name: '%s'" % args[0])
21812177
uri = S3Uri(args[0])
2178+
2179+
if uri.type != "s3" or not uri.has_bucket():
2180+
raise ParameterError("Expecting S3 URI instead of '%s'" % args[0])
2181+
21822182
try:
21832183
acl = s3.get_acl(uri)
21842184
acl_grant_list = acl.getGrantList()

0 commit comments

Comments
 (0)