Skip to content

Commit af0fb10

Browse files
committed
fix: order of try except
1 parent 0fd57e8 commit af0fb10

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

build_docs.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ def relative_path(filename):
105105
try:
106106
from sphinx.setup_command import BuildDoc
107107
except:
108-
108+
MyBuildDoc = None
109+
else:
109110
class MyBuildDoc(BuildDoc):
110111
""" Sub-class the standard sphinx documentation building system, to
111112
add logics for API generation and matplotlib's plot directive.
@@ -160,8 +161,6 @@ def finalize_options(self):
160161
"""
161162
self.build_dir = os.path.join(*DOC_BUILD_DIR.split(os.sep)[:-1])
162163
BuildDoc.finalize_options(self)
163-
else:
164-
MyBuildDoc = None
165164

166165
################################################################################
167166
# Distutils Command class to clean

0 commit comments

Comments
 (0)