Skip to content

Commit 6650819

Browse files
Corp Eng ML TeamJohn Sipple
Corp Eng ML Team
authored and
John Sipple
committed
Fix Python 3.7 error in third_party/py/madi/utils/file_utils.py.
PiperOrigin-RevId: 335103082
1 parent 5d7c609 commit 6650819

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/madi/utils/file_utils.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,17 @@
1616

1717
import functools
1818
import os
19+
import sys
1920
import typing
2021

2122
import attr
2223
import tensorflow as tf
2324

2425
# Imports with fallback to backports
2526
# pylint: disable=g-import-not-at-top
26-
try:
27+
if sys.version_info >= (3, 7):
2728
import importlib.resources as importlib_resources
28-
except ImportError:
29+
else:
2930
import importlib_resources # Backport for Python <3.7
3031

3132
try:

0 commit comments

Comments
 (0)