Skip to content

Commit fb7f9c4

Browse files
committed
check path first
1 parent 3577306 commit fb7f9c4

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

pipeline/storage.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,16 @@ def post_process(self, paths, dry_run=False, **options):
7474
return
7575

7676
for path in paths:
77-
if path and not matches_patterns(path, self.gzip_patterns):
78-
continue
79-
original_file = self.open(path)
80-
gzipped_path = "{0}.gz".format(path)
81-
if self.exists(gzipped_path):
82-
self.delete(gzipped_path)
83-
gzipped_file = self._compress(original_file)
84-
gzipped_path = self.save(gzipped_path, gzipped_file)
85-
yield gzipped_path, gzipped_path, True
77+
if path:
78+
if not matches_patterns(path, self.gzip_patterns):
79+
continue
80+
original_file = self.open(path)
81+
gzipped_path = "{0}.gz".format(path)
82+
if self.exists(gzipped_path):
83+
self.delete(gzipped_path)
84+
gzipped_file = self._compress(original_file)
85+
gzipped_path = self.save(gzipped_path, gzipped_file)
86+
yield gzipped_path, gzipped_path, True
8687

8788

8889
class NonPackagingMixin(object):

0 commit comments

Comments
 (0)