diff --git a/tvrip/cmdline.py b/tvrip/cmdline.py index 7167f93..4c6d082 100644 --- a/tvrip/cmdline.py +++ b/tvrip/cmdline.py @@ -37,8 +37,12 @@ import cmd import readline from textwrap import dedent -from importlib import resources from unittest import mock +try: + # Remove when base Python version >3.8 + import importlib_resources as resources +except ImportError: + from importlib import resources from rich import box from rich.console import Console diff --git a/tvrip/ripcmd.py b/tvrip/ripcmd.py index 0034800..abaf9ed 100644 --- a/tvrip/ripcmd.py +++ b/tvrip/ripcmd.py @@ -11,8 +11,12 @@ import re import subprocess as proc from pathlib import Path -from importlib import resources from datetime import timedelta, datetime +try: + # Remove when base Python version >3.8 + import importlib_resources as resources +except ImportError: + from importlib import resources import requests import sqlalchemy as sa