Skip to content

Commit 44c2be6

Browse files
committed
Don't emit an additional error in the asset handler when a previous error occurs
1 parent 2eabdb1 commit 44c2be6

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

CHANGES.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
v1.1.6
2+
* Don't emit an additional error in the copy assets handler if the build process fails
3+
14
v1.1.5
25
* Add sphinx_tabs_nowarn option to disable warning about incompatible builder. Useful when running sphinx-build with the -W flag
36

sphinx_tabs/tabs.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -256,16 +256,14 @@ def copy_assets(app, exception):
256256
'readthedocs', 'readthedocsdirhtml',
257257
'readthedocssinglehtml', 'readthedocssinglehtmllocalmedia']
258258
builders.extend(app.config['sphinx_tabs_valid_builders'])
259+
if exception:
260+
return
259261
if app.builder.name not in builders:
260262
if not app.config['sphinx_tabs_nowarn']:
261263
app.warn(
262264
'Not copying tabs assets! Not compatible with %s builder' %
263265
app.builder.name)
264266
return
265-
if exception:
266-
if not app.config['sphinx_tabs_nowarn']:
267-
app.warn('Not copying tabs assets! Error occurred previously')
268-
return
269267
app.info('Copying tabs assets... ', nonl=True)
270268

271269
installdir = os.path.join(app.builder.outdir, '_static', 'sphinx_tabs')

0 commit comments

Comments
 (0)