Skip to content

Commit

Permalink
Import importlib resources
Browse files Browse the repository at this point in the history
  • Loading branch information
mschwager committed Aug 28, 2024
1 parent 4699a1e commit 182b306
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fierce/fierce.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def find_subdomain_list_file(filename):
return os.path.abspath(filename_path)

try:
import importlib
from importlib import resources
except ImportError:
return filename

Expand All @@ -68,7 +68,7 @@ def find_subdomain_list_file(filename):
# installs (duh)
try:
# Use importlib.resources.as_file when Python 3.9 is minimum version
full_package_path = importlib.resources.path("fierce.lists", filename)
full_package_path = resources.path("fierce.lists", filename)
except ImportError:
return filename

Expand Down

0 comments on commit 182b306

Please sign in to comment.