tldr-python-dash-docset icon indicating copy to clipboard operation
tldr-python-dash-docset copied to clipboard

os.mkdir doesn't create intermediate-level directories, causing OSError.

Open MapleCCC opened this issue 5 years ago • 0 comments

This line of code use os.mkdir to create sub-directory.

try: os.mkdir(sub_path)
except OSError as e:
  print("Could not create dir " + e.strerror)
  raise SystemExit

It prompts error on my environment because os.mkdir doesn't make all intermediate-level directories needed to contain the leaf directory, as stated in the Python official documentation. Changing to os.makedirs solves my problem.

MapleCCC avatar Jan 29 '20 08:01 MapleCCC