Skip to content

Commit

Permalink
Prevent crash in CI environnement if we can't write in pylint's cache
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Sassoulas committed Aug 20, 2021
1 parent 72a202a commit 303654c
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions pylint/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,15 @@
except OSError:
pass
# Create spam prevention file for today
with open(spam_prevention_file, "w", encoding="utf8") as f:
f.write("")
try:
with open(spam_prevention_file, "w", encoding="utf8") as f:
f.write("")
except Exception: # pylint: disable=broad-except
# Can't write in PYLINT_HOME ?
print(
"Can't write the file that was supposed to "
f"prevent pylint.d deprecation spam in {PYLINT_HOME}."
)


def _get_pdata_path(base_name, recurs):
Expand Down

0 comments on commit 303654c

Please sign in to comment.