diff options
author | Daniƫl van Noord <13665637+DanielNoord@users.noreply.github.com> | 2021-09-10 09:49:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-10 09:49:22 +0200 |
commit | e777697819319200a6956e142405a0499995a2cb (patch) | |
tree | d8ffb40bdc6c9cc7a669b43dfba84b730c5e34d8 | |
parent | 1e85bb755a4f5afcacd3b18397d5c35c820fcca1 (diff) | |
download | pylint-git-e777697819319200a6956e142405a0499995a2cb.tar.gz |
Fix bug with cache's parent directory not existing (#4988)
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 #4900
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | doc/whatsnew/2.11.rst | 4 | ||||
-rw-r--r-- | pylint/config/__init__.py | 2 |
3 files changed, 9 insertions, 1 deletions
@@ -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? ============================ diff --git a/doc/whatsnew/2.11.rst b/doc/whatsnew/2.11.rst index 6a9ed6686..8dfcbf691 100644 --- a/doc/whatsnew/2.11.rst +++ b/doc/whatsnew/2.11.rst @@ -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 diff --git a/pylint/config/__init__.py b/pylint/config/__init__.py index a3e538124..f923a638d 100644 --- a/pylint/config/__init__.py +++ b/pylint/config/__init__.py @@ -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) |