Skip to content

Commit

Permalink
Avoid error when removing nonexistent file (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbednar authored and ceball committed Sep 13, 2018
1 parent 9dcdd14 commit 93ddcdb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions scripts/nbsite_cleandisthtml.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@ def IGetFiles(d):

for file_ in ("objects.inv",):
f = os.path.join(htmldir,file_)
print("removing %s"%f)
os.remove(f)
try:
print("removing %s"%f)
os.remove(f)
except:
pass

for path in IGetFiles(htmldir):
if os.path.splitext(path)[1].lower() == '.ipynb':
Expand Down

0 comments on commit 93ddcdb

Please sign in to comment.