aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/framework/load_library.py
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/python/framework/load_library.py')
-rw-r--r--tensorflow/python/framework/load_library.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/tensorflow/python/framework/load_library.py b/tensorflow/python/framework/load_library.py
index 1f2aa264c1..535c6017f5 100644
--- a/tensorflow/python/framework/load_library.py
+++ b/tensorflow/python/framework/load_library.py
@@ -26,7 +26,6 @@ import threading # pylint: disable=unused-import
from tensorflow.core.framework import op_def_pb2
from tensorflow.core.lib.core import error_codes_pb2 # pylint: disable=unused-import
from tensorflow.python import pywrap_tensorflow as py_tf
-from tensorflow.python.framework import errors_impl
from tensorflow.python.util import compat
from tensorflow.python.util.tf_export import tf_export
@@ -54,8 +53,7 @@ def load_op_library(library_filename):
Raises:
RuntimeError: when unable to load the library or get the python wrappers.
"""
- with errors_impl.raise_exception_on_not_ok_status() as status:
- lib_handle = py_tf.TF_LoadLibrary(library_filename, status)
+ lib_handle = py_tf.TF_LoadLibrary(library_filename)
op_list_str = py_tf.TF_GetOpList(lib_handle)
op_list = op_def_pb2.OpList()
@@ -99,5 +97,4 @@ def load_file_system_library(library_filename):
Raises:
RuntimeError: when unable to load the library.
"""
- with errors_impl.raise_exception_on_not_ok_status() as status:
- lib_handle = py_tf.TF_LoadLibrary(library_filename, status)
+ py_tf.TF_LoadLibrary(library_filename)