From e9e17b9ceff0c862c8f29d629ad54a1dc401ed73 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Mon, 22 Jun 2020 19:21:28 +0800 Subject: [PATCH] man/conf.py: print out path to file which contains undecodable chars Signed-off-by: Kefu Chai --- man/conf.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/man/conf.py b/man/conf.py index 6eb3faa84a03a..8d4381da3ee9e 100644 --- a/man/conf.py +++ b/man/conf.py @@ -1,4 +1,5 @@ import os +import sys project = u'Ceph' copyright = u'2010-2014, Inktank Storage, Inc. and contributors. Licensed under Creative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0)' @@ -46,7 +47,11 @@ def _get_manpages(): if base == 'index': continue path = os.path.join(section_dir, filename) - description = _get_description(path, base) + try: + description = _get_description(path, base) + except UnicodeDecodeError as e: + print(f"unable to decode {path}", file=sys.stderr) + raise e yield ( os.path.join(section, base), base, -- 2.39.5