diff --git a/useful_scripts/conc_gzip_files.py b/useful_scripts/conc_gzip_files.py index 340c68f..ce83445 100644 --- a/useful_scripts/conc_gzip_files.py +++ b/useful_scripts/conc_gzip_files.py @@ -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: