File tree Expand file tree Collapse file tree 1 file changed +1
-4
lines changed
Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -19,10 +19,7 @@ def get_environment() -> str:
1919def get_csv_content_dict_reader (file_key : str ) -> DictReader :
2020 """Returns the requested file contents from the source bucket in the form of a DictReader"""
2121 response = s3_client .get_object (Bucket = SOURCE_BUCKET_NAME , Key = file_key )
22- s3_object_body : StreamingBody = response ["Body" ]
23- # Try to seek, otherwise fallback to creating 2 objects
24- # Should test in real AWS in addition to moto
25- s3_object_bytes_io = BytesIO (s3_object_body .read ())
22+ s3_object_bytes_io = BytesIO (response ["Body" ].read ())
2623 encoding = "utf-8" if is_utf8 (s3_object_bytes_io , file_key ) else "windows-1252"
2724 text_io = TextIOWrapper (s3_object_bytes_io , encoding = encoding , newline = "" )
2825 return DictReader (text_io , delimiter = "|" )
You can’t perform that action at this time.
0 commit comments