Skip to content

Commit

Permalink
man/conf.py: print out path to file which contains undecodable chars
Browse files Browse the repository at this point in the history
Signed-off-by: Kefu Chai <[email protected]>
  • Loading branch information
tchaikov committed Jun 22, 2020
1 parent 8ed32f6 commit e9e17b9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion man/conf.py
Original file line number Diff line number Diff line change
@@ -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)'
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit e9e17b9

Please sign in to comment.