Skip to content

Commit 5b9d9b2

Browse files
authored
Merge pull request #101 from rackerlabs/fix_extra
Ensuring the ignore list is used for extra files as well
2 parents 019b010 + 8b497a0 commit 5b9d9b2

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Diff for: lambda_uploader/package.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -235,17 +235,19 @@ def package(self, ignore=[]):
235235
LOG.info('Copying lib64 site packages')
236236
utils.copy_tree(lib64_path, package)
237237

238+
# Append the temp workspace to the ignore list:
239+
ignore += ["^%s/*" % TEMP_WORKSPACE_NAME]
240+
utils.copy_tree(self._path, package, ignore)
241+
242+
# Add extra files
238243
for p in self._extra_files:
239244
LOG.info('Copying extra %s into package' % p)
240245
ignore += ["%s" % p]
241246
if os.path.isdir(p):
242-
utils.copy_tree(p, package, include_parent=True)
247+
utils.copy_tree(p, package, ignore=ignore, include_parent=True)
243248
else:
244249
shutil.copy(p, package)
245250

246-
# Append the temp workspace to the ignore list:
247-
ignore += ["^%s/*" % TEMP_WORKSPACE_NAME]
248-
utils.copy_tree(self._path, package, ignore)
249251
self._create_zip(package)
250252

251253
def _create_zip(self, src):

0 commit comments

Comments
 (0)