Skip to content

Commit

Permalink
Fix bug with cache's parent directory not existing
Browse files Browse the repository at this point in the history
By changing the function used to create the cache from ``os.mkdir``
to ``os.makedirs`` we now handle non-existing parent directories
correctly.
This closes pylint-dev#4900
  • Loading branch information
DanielNoord committed Sep 10, 2021
1 parent 1e85bb7 commit 00907c8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions ChangeLog
Expand Up @@ -73,6 +73,10 @@ Release date: TBA

Closes #4901

* Fix a bug where pylint complained if the cache's parent directory does not exist

Closes #4900


What's New in Pylint 2.10.3?
============================
Expand Down
4 changes: 4 additions & 0 deletions doc/whatsnew/2.11.rst
Expand Up @@ -75,3 +75,7 @@ Other Changes
* Setting ``min-similarity-lines`` to 0 now makes the similarty checker stop checking for duplicate code

Closes #4901

* Fix a bug where pylint complained if the cache's parent directory does not exist

Closes #4900
2 changes: 1 addition & 1 deletion pylint/config/__init__.py
Expand Up @@ -125,7 +125,7 @@ def load_results(base):
def save_results(results, base):
if not os.path.exists(PYLINT_HOME):
try:
os.mkdir(PYLINT_HOME)
os.makedirs(PYLINT_HOME)
except OSError:
print(f"Unable to create directory {PYLINT_HOME}", file=sys.stderr)
data_file = _get_pdata_path(base, 1)
Expand Down

0 comments on commit 00907c8

Please sign in to comment.