File tree 2 files changed +7
-3
lines changed
2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 21
21
import webbrowser
22
22
import jinja2
23
23
24
- from scripts .announce import update_name_wordlist
25
24
26
25
27
26
DOC_PATH = os .path .dirname (os .path .abspath (__file__ ))
@@ -309,7 +308,11 @@ def zip_html(self):
309
308
310
309
def spellcheck (self ):
311
310
"""Spell check the documentation."""
312
- update_name_wordlist ()
311
+ try :
312
+ from scripts .announce import update_name_wordlist
313
+ update_name_wordlist ()
314
+ except (ImportError , ModuleNotFoundError ):
315
+ print ("Unable to update name wordlist, run python script/announce.py to update the list." )
313
316
self ._sphinx_build ('spelling' )
314
317
output_location = os .path .join ('build' , 'spelling' , 'output.txt' )
315
318
with open (output_location ) as output :
Original file line number Diff line number Diff line change 79
79
80
80
try :
81
81
import sphinxcontrib .spelling # noqa
82
- except ImportError as err :
82
+ import git
83
+ except (ImportError , ModuleNotFoundError ) as err :
83
84
logger .warning (('sphinxcontrib.spelling failed to import with error "{}". '
84
85
'`spellcheck` command is not available.' .format (err )))
85
86
else :
You can’t perform that action at this time.
0 commit comments