##// END OF EJS Templates
Backport PR #10558: Let nbformat take care of opening the file...
Matthias Bussonnier -
Show More
@@ -2535,8 +2535,7 class InteractiveShell(SingletonConfigurable):
2535 """generator for sequence of code blocks to run"""
2535 """generator for sequence of code blocks to run"""
2536 if fname.endswith('.ipynb'):
2536 if fname.endswith('.ipynb'):
2537 from nbformat import read
2537 from nbformat import read
2538 with io_open(fname) as f:
2538 nb = read(fname, as_version=4)
2539 nb = read(f, as_version=4)
2540 if not nb.cells:
2539 if not nb.cells:
2541 return
2540 return
2542 for cell in nb.cells:
2541 for cell in nb.cells:
General Comments 0
You need to be logged in to leave comments. Login now