Skip to content

Commit dc2f475

Browse files
committed
Import exclude path fct. from FL util
1 parent 18e1e06 commit dc2f475

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ py-tlsh
88
pytz
99
XlsxWriter
1010
PyYAML
11-
fosslight_util>=2.1.6
11+
fosslight_util>=2.1.10
1212
dependency-check

src/fosslight_binary/binary_analysis.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
from ._simple_mode import print_simple_mode, filter_binary, init_simple
2222
from fosslight_util.correct import correct_with_yaml
2323
from fosslight_util.oss_item import ScannerItem
24+
from fosslight_util.exclude import excluding_files
2425
import hashlib
2526
import tlsh
2627
from io import open
@@ -206,7 +207,8 @@ def find_binaries(path_to_find_bin, output_dir, formats, dburl="", simple_mode=F
206207
results = []
207208
bin_list = []
208209
scan_item = ScannerItem(PKG_NAME, "")
209-
abs_path_to_exclude = [os.path.abspath(path) for path in path_to_exclude if path.strip() != ""]
210+
exclude_path = excluding_files(path_to_exclude, path_to_find_bin)
211+
abs_path_to_exclude = [os.path.abspath(path) for path in exclude_path]
210212

211213
if not os.path.isdir(path_to_find_bin):
212214
error_occured(error_msg=f"(-p option) Can't find the directory: {path_to_find_bin}",

0 commit comments

Comments
 (0)