]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
man/conf.py: print out path to file which contains undecodable chars 35698/head
authorKefu Chai <kchai@redhat.com>
Mon, 22 Jun 2020 11:21:28 +0000 (19:21 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 22 Jun 2020 11:41:39 +0000 (19:41 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
man/conf.py

index 6eb3faa84a03aed87b0f21c5808a53fad4b6ddde..8d4381da3ee9e5e1864c19452a8894b66dc8799b 100644 (file)
@@ -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,