diff options
author | ideal <idealities@gmail.com> | 2021-03-07 12:21:14 +0800 |
---|---|---|
committer | ideal <idealities@gmail.com> | 2021-03-07 12:21:14 +0800 |
commit | 78034ec77a510f466901e40180d76578df120d35 (patch) | |
tree | 5e744128653f52c95c5e4069a7bfc124915991cf /ranger | |
parent | cd17ea8c1d2cd89754f625df25134f00c7227b65 (diff) | |
download | ranger-78034ec77a510f466901e40180d76578df120d35.tar.gz |
Fix crash if man is not installed when hit '?' and 'm'.
On some systems (e.g. archlinuxarm) man is not installed by default, hit '?' and 'm' will cause ranger crashed, showing: AttributeError: 'NoneType' object has no attribute 'poll'.
Diffstat (limited to 'ranger')
-rw-r--r-- | ranger/core/actions.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py index adfbe94d..c458da11 100644 --- a/ranger/core/actions.py +++ b/ranger/core/actions.py @@ -974,6 +974,9 @@ class Actions( # pylint: disable=too-many-instance-attributes,too-many-public-m if process.poll() != 16: return process = self.run(['man', 'ranger']) + if process is None: + self.notify("Show manpage failed, check if man is installed", bad=True) + return if process.poll() == 16: self.notify("Could not find manpage.", bad=True) |