Skip to content

Commit e42e1ca

Browse files
author
Daniel Hermann
committed
Fix missing 'proxy' and 'cache' params in 'fetch_database' call
In safety.check(), when vulnerable packages are found, a second 'fetch_database' call is executed to get details. However, the 'proxy' and 'cache' parameters are not passed to it. This patch fixes that.
1 parent 3b81f90 commit e42e1ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

safety/safety.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def check(packages, key, db_mirror, cached, ignore_ids, proxy):
137137
spec_set = SpecifierSet(specifiers=specifier)
138138
if spec_set.contains(pkg.version):
139139
if not db_full:
140-
db_full = fetch_database(full=True, key=key, db=db_mirror)
140+
db_full = fetch_database(full=True, key=key, db=db_mirror, cached=cached, proxy=proxy)
141141
for data in get_vulnerabilities(pkg=name, spec=specifier, db=db_full):
142142
vuln_id = data.get("id").replace("pyup.io-", "")
143143
if vuln_id and vuln_id not in ignore_ids:

0 commit comments

Comments
 (0)