Skip to content

Commit

Permalink
Merge pull request #8 from daltonmaag/mkdir-race
Browse files Browse the repository at this point in the history
Always try and create `~/.youseedee`, handle exception
  • Loading branch information
simoncozens authored Aug 7, 2024
2 parents 570fcf1 + cd67c0e commit a59788a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/youseedee/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ def bisect_key(haystack, needle, key):

def ucd_dir():
ucddir = os.path.expanduser("~/.youseedee")
if not os.path.isdir(ucddir):
try:
os.mkdir(ucddir)
except FileExistsError:
pass
return ucddir


Expand Down

0 comments on commit a59788a

Please sign in to comment.