Skip to content

Commit

Permalink
fix errors when {js,css}.filename is None (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
njzjz authored Aug 26, 2023
1 parent b75620a commit cb5d01a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions deepmodeling_sphinx/inject.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ def minify_js_files(app, exception):
# not html builder
return
for js in app.builder.script_files:
if js.filename is None:
continue
fn = os.path.join(app.builder.outdir, js.filename)
if os.path.isfile(fn):
with open(fn, "r+") as f:
Expand All @@ -146,6 +148,8 @@ def minify_css_files(app, exception):
# not html builder
return
for css in app.builder.css_files:
if css.filename is None:
continue
fn = os.path.join(app.builder.outdir, css.filename)
if os.path.isfile(fn):
with open(fn, "r+") as f:
Expand Down

0 comments on commit cb5d01a

Please sign in to comment.