Skip to content

Commit

Permalink
update indexes on remote TileDirectories (#274)
Browse files Browse the repository at this point in the history
* handle path of tile not provided in output_tiles
  • Loading branch information
ungarj committed Jul 22, 2020
1 parent 646d503 commit 1e4f02e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions mapchete/io/_path.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def path_exists(path):
elif path.startswith("s3://"):
bucket = get_boto3_bucket(path.split("/")[2])
key = "/".join(path.split("/")[3:])
for obj in bucket.objects.filter(Prefix=key):
for obj in bucket.objects.filter(Prefix=key, RequestPayer='requester'):
if obj.key == key:
return True
else:
Expand Down Expand Up @@ -208,7 +208,10 @@ def tiles_exist(config=None, output_tiles=None, process_tiles=None):

for obj in contents:
# get matching tile
tile = paths[os.path.join("s3://" + bucket, obj["Key"])]
try:
tile = paths[os.path.join("s3://" + bucket, obj["Key"])]
except KeyError: # pragma: no cover
continue
# store and yield process tile if it was not already yielded
if tile not in yielded:
yielded.add(tile)
Expand Down

0 comments on commit 1e4f02e

Please sign in to comment.