From 5700fb89a3aa160b18108abaf4b252f6aeb1045a Mon Sep 17 00:00:00 2001 From: Frederico Araujo Date: Sun, 20 Nov 2022 10:45:08 -0500 Subject: [PATCH] fix(py3): fix import of importlib metadata package for Python 3.7 Signed-off-by: Frederico Araujo --- py3/classes/sysflow/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/py3/classes/sysflow/__init__.py b/py3/classes/sysflow/__init__.py index b183d47..1eb2cd2 100644 --- a/py3/classes/sysflow/__init__.py +++ b/py3/classes/sysflow/__init__.py @@ -18,7 +18,10 @@ # See the License for the specific language governing permissions and # limitations under the License. # -from importlib.metadata import version, PackageNotFoundError +try: + from importlib.metadata import version, PackageNotFoundError +except ModuleNotFoundError: + from importlib_metadata import version, PackageNotFoundError __version__ = '' try: