Skip to content

Commit

Permalink
Remove ModuleNotFoundError.
Browse files Browse the repository at this point in the history
  • Loading branch information
cweill committed Sep 29, 2019
1 parent 5501ebc commit 5021681
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions adanet/tf_compat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def test_wrapper(*args, **kwargs):
_ = tf.contrib
_ = tf.contrib.estimator.regression_head(
loss_reduction=tf.compat.v1.losses.Reduction.SUM_OVER_BATCH_SIZE)
except (AttributeError, ImportError, ModuleNotFoundError):
except (AttributeError, ImportError):
self.skipTest("Skipping test in TF 2.0.")
return f(*args, **kwargs)

Expand All @@ -219,7 +219,7 @@ def test_wrapper(*args, **kwargs):
try:
# If tf.contrib doesn't exist, we are in TF 2.0.
_ = tf_v2.contrib
except (AttributeError, ImportError, ModuleNotFoundError):
except (AttributeError, ImportError):
return f(*args, **kwargs)
self.skipTest("Skipping test in TF 1.0.")
return f(*args, **kwargs)
Expand Down

0 comments on commit 5021681

Please sign in to comment.