Skip to content

Commit

Permalink
add a logger
Browse files Browse the repository at this point in the history
Signed-off-by: ziadhany <ziadhany2016@gmail.com>
  • Loading branch information
ziadhany committed Jan 24, 2023
1 parent 9770a0a commit 81b9128
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions vulnerabilities/importers/fireeye.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# 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
Expand All @@ -16,6 +17,8 @@
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"
Expand All @@ -36,8 +39,7 @@ def advisory_data(self) -> Iterable[AdvisoryData]:
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:
Expand Down

0 comments on commit 81b9128

Please sign in to comment.