Skip to content

Commit

Permalink
fix for strict in opener
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcgugan committed Oct 21, 2017
1 parent d73c7e9 commit 87ecfe4
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions fs_s3fs/opener.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,17 @@ def open_fs(self, fs_url, parse_result, writeable, create, cwd):
raise OpenerError(
"invalid bucket name in '{}'".format(fs_url)
)
strict = parse_result.params.get('strict', 'y') == 'y'
strict = (
parse_result.params['strict'] == '1'
if 'strict' in parse_result.params
else True
)
s3fs = S3FS(
bucket_name,
dir_path=dir_path or '/',
aws_access_key_id=parse_result.username or None,
aws_secret_access_key=parse_result.password or None,
endpoint_url=parse_result.params.get('endpoint_url', None)
endpoint_url=parse_result.params.get('endpoint_url', None),
strict=strict
)
return s3fs

0 comments on commit 87ecfe4

Please sign in to comment.