Skip to content

Commit c42f9cb

Browse files
committed
Remember _mkdir exists.
1 parent 17a4626 commit c42f9cb

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

pebble_tool/commands/sdk/create.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,7 @@ def copy_group(group, must_succeed=True):
100100
origin_path = extant_path(os.path.join(template_root, x) for x in origins)
101101
if origin_path is not None:
102102
copied_files += 1
103-
try:
104-
os.makedirs(os.path.dirname(target_path))
105-
except OSError as e:
106-
if e.errno != errno.EEXIST:
107-
raise
103+
_mkdirs(target_path)
108104
with open(origin_path) as f:
109105
template_content = f.read()
110106
with open(substitute(target_path), 'w') as f:

0 commit comments

Comments
 (0)