Skip to content

Commit

Permalink
try stripping / from s3 keys
Browse files Browse the repository at this point in the history
  • Loading branch information
dsschult committed Jul 14, 2023
1 parent 3582c57 commit c754c26
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions iceprod/server/grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,9 @@ def presign_s3(cfg):
if bucket not in s3_creds[url]['buckets']:
raise RuntimeError('bad s3 bucket')

while key.startswith('/'):
key = key[1:]

s = S3(url, s3_creds[url]['access_key'], s3_creds[url]['secret_key'], bucket=bucket)
logger.info(f'S3 url={url} bucket={bucket} key={key}')
if d['movement'] == 'input':
Expand Down

0 comments on commit c754c26

Please sign in to comment.