We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1e7a629 commit be3e1aeCopy full SHA for be3e1ae
1 file changed
scapy/config.py
@@ -631,10 +631,18 @@ def load(self, extension: str):
631
try:
632
import importlib.metadata
633
except ImportError:
634
- raise ImportError("Cannot import importlib.metadata ! Upgrade Python.")
+ log_loading.warning(
635
+ "'%s' not loaded. "
636
+ "Scapy extensions require at least Python 3.8+ !" % extension
637
+ )
638
+ return
639
640
# Get extension distribution
- distr = importlib.metadata.distribution(extension)
641
+ try:
642
+ distr = importlib.metadata.distribution(extension)
643
+ except importlib.metadata.PackageNotFoundError:
644
+ log_loading.warning("The extension '%s' was not found !" % extension)
645
646
647
# Check the classifiers
648
if distr.metadata.get('License-Expression', None) not in self.GPLV2_LICENCES:
0 commit comments