8000 Merge pull request #15414 from meeseeksmachine/auto-backport-of-pr-15… · matplotlib/matplotlib@2da3832 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2da3832

Browse files
authored
Merge pull request #15414 from meeseeksmachine/auto-backport-of-pr-15413-on-v3.2.x
Backport PR #15413 on branch v3.2.x (catch OSError instead of FileNotFoundError in _get_executable_info to resolve #15399)
2 parents 647d2eb + 2cd491f commit 2da3832

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

lib/matplotlib/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,8 +337,8 @@ def impl(args, regex, min_ver=None, ignore_exit_code=False):
337337
output = _cpe.output
338338
else:
339339
raise ExecutableNotFoundError(str(_cpe)) from _cpe
340-
except FileNotFoundError as _fnf:
341-
raise ExecutableNotFoundError(str(_fnf)) from _fnf
340+
except OSError as _ose:
341+
raise ExecutableNotFoundError(str(_ose)) from _ose
342342
match = re.search(regex, output)
343343
if match:
344344
version = LooseVersion(match.group(1))

lib/matplotlib/animation.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -727,8 +727,9 @@ def bin_path(cls):
727727
def isAvailable(cls):
728728
try:
729729
return super().isAvailable()
730-
except mpl.ExecutableNotFoundError:
730+
except mpl.ExecutableNotFoundError as _enf:
731731
# May be raised by get_executable_info.
732+
_log.debug('ImageMagick unavailable due to: %s', _enf)
732733
return False
733734

734735

0 commit comments

Comments
 (0)
0