Skip to content

Commit 05298df

Browse files
Fix init trying to copy a __pycache__ directory
1 parent 595b5eb commit 05298df

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

aws_lambda/aws_lambda.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,10 @@ def init(src, minimal=False):
142142
for filename in os.listdir(templates_path):
143143
if (minimal and filename == 'event.json') or filename.endswith('.pyc'):
144144
continue
145-
destination = os.path.join(templates_path, filename)
146-
copy(destination, src)
145+
dest_path = os.path.join(templates_path, filename)
146+
147+
if not os.path.isdir(dest_path):
148+
copy(dest_path, src)
147149

148150

149151
def build(src, requirements=False, local_package=None):

0 commit comments

Comments
 (0)