diff options
Diffstat (limited to 'share/tools')
-rwxr-xr-x | share/tools/create_manpage_completions.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/share/tools/create_manpage_completions.py b/share/tools/create_manpage_completions.py index 8529eade..fe9c52c3 100755 --- a/share/tools/create_manpage_completions.py +++ b/share/tools/create_manpage_completions.py @@ -736,12 +736,14 @@ def parse_manpage_at_path(manpage_path, output_directory): fd = lzma.LZMAFile(str(manpage_path), 'r') manpage = fd.read() if IS_PY3: manpage = manpage.decode('latin-1') - else: + elif manpage_path.endswith((".1", ".2", ".3", ".4", ".5", ".6", ".7", ".8", ".9")): if IS_PY3: fd = open(manpage_path, 'r', encoding='latin-1') else: fd = open(manpage_path, 'r') manpage = fd.read() + else: + return fd.close() manpage = str(manpage) |