def _GetVersioning(self):
    """Gets versioning configuration for one or more buckets."""
    url_args = self.args

    # Iterate over URLs, expanding wildcards and getting the versioning
    # configuration on each.
    some_matched = False
    for url_str in url_args:
      bucket_iter = self.GetBucketUrlIterFromArg(url_str,
                                                 bucket_fields=['versioning'])
      for blr in bucket_iter:
        some_matched = True
        if blr.root_object.versioning and blr.root_object.versioning.enabled:
          print '%s: Enabled' % blr.url_string.rstrip('/')
        else:
          print '%s: Suspended' % blr.url_string.rstrip('/')
    if not some_matched:
      raise CommandException(NO_URLS_MATCHED_TARGET % list(url_args))
dataset/ETHPy150Open GoogleCloudPlatform/gsutil/gslib/commands/versioning.py/VersioningCommand._GetVersioning/original