Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/certbot/certbot.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorosirisinferi <github@flut.nl.eu.org>2022-09-16 16:34:02 +0300
committerGitHub <noreply@github.com>2022-09-16 16:34:02 +0300
commitd214da191d507cd8957ae70fa17aad133db6bc5d (patch)
treeadf106e73b71faf782bece5b699216769d8a567d
parent0326cbf95e48656a0da489f6bba2cd940b06b5d9 (diff)
Certbot-specific temp log dir prefix (#9406)
Fixes #9405.
-rw-r--r--certbot/CHANGELOG.md2
-rw-r--r--certbot/certbot/_internal/log.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/certbot/CHANGELOG.md b/certbot/CHANGELOG.md
index 8c5f65e50..018eaa049 100644
--- a/certbot/CHANGELOG.md
+++ b/certbot/CHANGELOG.md
@@ -10,7 +10,7 @@ Certbot adheres to [Semantic Versioning](https://semver.org/).
### Changed
-*
+* If Certbot exits before setting up its usual log files, the temporary directory created to save logging information will begin with the name `certbot-log-` rather than a generic name. This should not be considered a [stable aspect of Certbot](https://certbot.eff.org/docs/compatibility.html) and may change again in the future.
### Fixed
diff --git a/certbot/certbot/_internal/log.py b/certbot/certbot/_internal/log.py
index 6d089afd4..b6b7d4601 100644
--- a/certbot/certbot/_internal/log.py
+++ b/certbot/certbot/_internal/log.py
@@ -264,7 +264,7 @@ class TempHandler(logging.StreamHandler):
"""
def __init__(self) -> None:
- self._workdir = tempfile.mkdtemp()
+ self._workdir = tempfile.mkdtemp(prefix="certbot-log-")
self.path = os.path.join(self._workdir, 'log')
stream = util.safe_open(self.path, mode='w', chmod=0o600)
super().__init__(stream)