def _get_s3_urls(self, source):
     """Recursively list all files inside the source URL directory."""
     s3_conn = boto.connect_s3()
     bucket_name, root = get_s3_bucket_key_names(source)
     bucket = s3_conn.get_bucket(bucket_name)
     for key_metadata in bucket.list(root):
         if key_metadata.size > 0:
             key_path = key_metadata.key[len(root):].lstrip('/')
             yield url_path_join(source, key_path)
Example #2
0
 def _get_s3_urls(self, source):
     """Recursively list all files inside the source URL directory."""
     s3_conn = boto.connect_s3()
     bucket_name, root = get_s3_bucket_key_names(source)
     bucket = s3_conn.get_bucket(bucket_name)
     for key_metadata in bucket.list(root):
         if key_metadata.size > 0:
             key_path = key_metadata.key[len(root):].lstrip('/')
             yield url_path_join(source, key_path)