Skip to content

Commit

Permalink
fix issue 17
Browse files Browse the repository at this point in the history
remove redundant importlib import; address feedback
  • Loading branch information
ian-hurst authored and ianh-edico committed Oct 30, 2024
1 parent 1ef19df commit b44993b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions rpm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,19 @@ def get_system_sitepackages_and_suffixes() -> List[Dict[str, List[str]]]:
def get_sitepackages_and_suffixes(interpreter):
script = textwrap.dedent(
"""
import importlib
import importlib.machinery
import json
import site
try:
import importlib.machinery
except ImportError:
suffixes = []
else:
suffixes = importlib.machinery.EXTENSION_SUFFIXES
print(
json.dumps(
{
"sitepackages": site.getsitepackages(),
"suffixes": importlib.machinery.EXTENSION_SUFFIXES,
"suffixes": suffixes,
}
)
)
Expand Down

0 comments on commit b44993b

Please sign in to comment.