add a logger
# See https://github.com/nexB/vulnerablecode for support or download.
# See https://aboutcode.org for more information about nexB OSS projects.
#
+import logging
import re
from pathlib import Path
from typing import Iterable
@@ -16,6 +17,8 @@ from vulnerabilities.importer import Reference
from vulnerabilities.utils import build_description
from vulnerabilities.utils import dedupe
+logger = logging.getLogger(__name__)
+
class FireyeImporter(GitImporter):
spdx_license_expression = "CC-BY-SA-4.0 AND MIT"
@@ -36,8 +39,7 @@ class FireyeImporter(GitImporter):
with open(file) as f:
yield parse_advisory_data(f.read())
except UnicodeError:
- print(file)
-
+ logger.error(f"Invalid file {file}")
def parse_advisory_data(raw_data) -> AdvisoryData:
