Skip to content
This repository has been archived by the owner on Jan 1, 2021. It is now read-only.

Commit

Permalink
Removed contextlib.nested
Browse files Browse the repository at this point in the history
  • Loading branch information
OMOTO Kenji committed Jan 18, 2018
1 parent f63beab commit 998553d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions execjs/_pyv8runtime.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import json
import contextlib

import execjs._exceptions as exceptions
from execjs._abstract_runtime import AbstractRuntime
Expand Down Expand Up @@ -48,7 +47,7 @@ def _exec_(self, source):
source = str(source)

# backward compatibility
with contextlib.nested(PyV8.JSContext(), PyV8.JSEngine()) as (ctxt, engine):
with PyV8.JSContext() as ctxt, PyV8.JSEngine() as engine:
js_errors = (PyV8.JSError, IndexError, ReferenceError, SyntaxError, TypeError)
try:
script = engine.compile(source)
Expand Down

0 comments on commit 998553d

Please sign in to comment.