Update conc_gzip_files.py

This commit is contained in:
Sebastian Raschka 2014-04-01 15:40:27 -04:00
parent dd52d960f6
commit 98980fc77b

View File

@ -17,7 +17,7 @@ def conc_gzip_files(in_dir, out_file, append=False):
write_mode = 'w'
if append:
write_mode = 'a'
gzips = [os.path.join(in_dir, i) for i in os.listdir(in_dir) if i.endswith(i)]
gzips = [os.path.join(in_dir, i) for i in os.listdir(in_dir) if i.endswith('.gz')]
with open(out_file, write_mode) as ofile:
for f in gzips:
with gzip.open(f, 'rb') as gzipf: