Skip to content

Commit 6749ca1

Browse files
authored
fix(log): filenotfound exception when cfn submit cluttering logs (#213)
* set rmtree to ignore errors
1 parent 54541d5 commit 6749ca1

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

python/rpdk/python/codegen.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -235,10 +235,8 @@ def package(self, project, zip_file):
235235

236236
@staticmethod
237237
def _remove_build_artifacts(deps_path):
238-
try:
239-
shutil.rmtree(deps_path)
240-
except FileNotFoundError:
241-
LOG.debug("'%s' not found, skipping removal", deps_path, exc_info=True)
238+
LOG.debug("Removing '%s' folder.", deps_path)
239+
shutil.rmtree(deps_path, ignore_errors=True)
242240

243241
def _build(self, base_path):
244242
LOG.debug("Dependencies build started from '%s'", base_path)

0 commit comments

Comments
 (0)