Skip to content

Commit bff0f3e

Browse files
committed
Update S3 get_filepath_or_buffer compression
1 parent 1fc68b2 commit bff0f3e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

pandas/io/s3.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,7 @@ def get_filepath_or_buffer(filepath_or_buffer, encoding=None,
9999
conn = boto.connect_s3(host=s3_host, anon=True)
100100

101101
b = conn.get_bucket(parsed_url.netloc, validate=False)
102-
if compat.PY2 and (compression == 'gzip' or
103-
(compression == 'infer' and
104-
filepath_or_buffer.endswith(".gz"))):
102+
if compat.PY2 and compression:
105103
k = boto.s3.key.Key(b, parsed_url.path)
106104
filepath_or_buffer = BytesIO(k.get_contents_as_string(
107105
encoding=encoding))

0 commit comments

Comments
 (0)