def can_list(access_key, secret_key):
 if (not (access_key and secret_key)):
  return False
 try:
  connect_s3(access_key, secret_key).get_all_buckets()
 except exception.S3ResponseError:
  return False
 return True

def can_list ( access_key , secret_key ) : if ( not ( access_key and secret_key ) ) : return False try : connect_s3 ( access_key , secret_key ) . get_all_buckets ( ) except exception . S3ResponseError : return False return True
return whether or not a user can list all buckets accessable by this keys .