From 22016934b308f7cb088ee0ce10d1cdcc3dc4724b Mon Sep 17 00:00:00 2001 From: Brandon Maier Date: Mon, 2 Dec 2024 10:35:02 -0600 Subject: [PATCH 1/2] gracefully handle if git is not installed The following error occurs in `_get_contributors()` if git is not installed. > FileNotFoundError: [Errno 2] No such file or directory: 'git': 'git' Treat this the same as if `git` fails, catch the error and print a warning. --- sphinxcontrib/spelling/filters.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sphinxcontrib/spelling/filters.py b/sphinxcontrib/spelling/filters.py index e9265df..60d9024 100644 --- a/sphinxcontrib/spelling/filters.py +++ b/sphinxcontrib/spelling/filters.py @@ -245,7 +245,7 @@ def _get_contributors(self): try: p = subprocess.run(cmd, check=True, stdout=subprocess.PIPE) - except subprocess.CalledProcessError as err: + except (subprocess.CalledProcessError, FileNotFoundError) as err: logger.warning('Called: %s', ' '.join(cmd)) logger.warning('Failed to scan contributors: %s', err) return set() From 7b10eea4faaeaaf743ed7d713c3ea8f7690e8194 Mon Sep 17 00:00:00 2001 From: Brandon Maier Date: Mon, 9 Dec 2024 08:13:18 -0600 Subject: [PATCH 2/2] update history --- docs/source/history.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/source/history.rst b/docs/source/history.rst index e68c72e..8249907 100644 --- a/docs/source/history.rst +++ b/docs/source/history.rst @@ -30,6 +30,12 @@ Next - Modernize packaging using setuptools, build, and setuptools_scm instead of pbr. +Bug Fixes +--------- + +- `#229 `__ Gracefully + handle if git is not installed + 7.7.0 =====