Skip to content

Commit 34474ff

Browse files
authored
Merge pull request #3057 from bsipocz/MAINT_systemtools_cleanup
MAINT: remove unused system tool gunzip
2 parents e6a1c1f + 7ab37ef commit 34474ff

File tree

2 files changed

+0
-45
lines changed

2 files changed

+0
-45
lines changed

astroquery/utils/system_tools.py

-27
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,6 @@
11
# Licensed under a 3-clause BSD style license - see LICENSE.rst
22

3-
import gzip
43
import os
5-
import shutil
6-
7-
8-
def gunzip(filename):
9-
""" Decompress a file with gzip.
10-
11-
Parameters
12-
----------
13-
filename : str
14-
Fully qualified path of the file to decompress.
15-
16-
Returns
17-
-------
18-
filename : str
19-
Name of the decompressed file (or input filename if gzip is not
20-
available).
21-
"""
22-
23-
# ".fz" denotes RICE rather than gzip compression
24-
if not filename.endswith('.fz'):
25-
with gzip.open(filename, 'rb') as f_in:
26-
with open(filename.rsplit(".", 1)[0], 'wb') as f_out:
27-
shutil.copyfileobj(f_in, f_out)
28-
return filename.rsplit(".", 1)[0]
29-
else:
30-
return filename
314

325

336
# If there is an update issue of astropy#2793 that got merged, this should

astroquery/utils/tests/test_system_tools.py

-18
This file was deleted.

0 commit comments

Comments
 (0)