diff options
Diffstat (limited to 'tensorflow/python/framework/errors_impl.py')
-rw-r--r-- | tensorflow/python/framework/errors_impl.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/python/framework/errors_impl.py b/tensorflow/python/framework/errors_impl.py index 04a6e4d7fb..32c96ec947 100644 --- a/tensorflow/python/framework/errors_impl.py +++ b/tensorflow/python/framework/errors_impl.py @@ -456,8 +456,8 @@ def _make_specific_exception(node_def, op, message, error_code): @contextlib.contextmanager def raise_exception_on_not_ok_status(): + status = pywrap_tensorflow.TF_NewStatus() try: - status = pywrap_tensorflow.TF_NewStatus() yield status if pywrap_tensorflow.TF_GetCode(status) != 0: raise _make_specific_exception( |