Skip to content

Commit

Permalink
Fix missing await when call 'async_replace_file' (#595)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wh1isper authored Oct 20, 2021
1 parent 1a6a481 commit f944deb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jupyter_server/services/contents/fileio.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,8 @@ async def _read_notebook(self, os_path, as_version=4):

# Move the bad file aside, restore the intermediate, and try again.
invalid_file = path_to_invalid(os_path)
async_replace_file(os_path, invalid_file)
async_replace_file(tmp_path, os_path)
await async_replace_file(os_path, invalid_file)
await async_replace_file(tmp_path, os_path)
return await self._read_notebook(os_path, as_version)

async def _save_notebook(self, os_path, nb):
Expand Down

0 comments on commit f944deb

Please sign in to comment.