Skip to content

Commit 536f596

Browse files
ziadhanyTG1999
authored andcommitted
add a logger
Signed-off-by: ziadhany <[email protected]>
1 parent 3a28667 commit 536f596

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

vulnerabilities/importers/fireeye.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
# See https://github.com/nexB/vulnerablecode for support or download.
77
# See https://aboutcode.org for more information about nexB OSS projects.
88
#
9+
import logging
910
import re
1011
from pathlib import Path
1112
from typing import Iterable
@@ -16,6 +17,8 @@
1617
from vulnerabilities.utils import build_description
1718
from vulnerabilities.utils import dedupe
1819

20+
logger = logging.getLogger(__name__)
21+
1922

2023
class FireyeImporter(GitImporter):
2124
spdx_license_expression = "CC-BY-SA-4.0 AND MIT"
@@ -36,8 +39,7 @@ def advisory_data(self) -> Iterable[AdvisoryData]:
3639
with open(file) as f:
3740
yield parse_advisory_data(f.read())
3841
except UnicodeError:
39-
print(file)
40-
42+
logger.error(f"Invalid file {file}")
4143

4244

4345
def parse_advisory_data(raw_data) -> AdvisoryData:

0 commit comments

Comments
 (0)