Skip to content

Commit

Permalink
don't fail to create lmodrc.lua if parent directory already exists
Browse files Browse the repository at this point in the history
  • Loading branch information
boegel committed Sep 23, 2021
1 parent d4eb841 commit a0745c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion create_lmodrc.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def error(msg):
'prefix': prefix,
}
try:
os.makedirs(os.path.dirname(lmodrc_path))
os.makedirs(os.path.dirname(lmodrc_path), exist_ok=True)
with open(lmodrc_path, 'w') as fp:
fp.write(lmodrc_txt)

Expand Down

0 comments on commit a0745c1

Please sign in to comment.