Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions mythx_cli/analyze/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,13 +262,13 @@ def analyze(
# reduce to whitelisted contract names
if include:
LOGGER.debug(f"Filtering {len(jobs)} job(s) for contracts to be included")
found_contracts = {job["contract_name"] for job in jobs}
found_contracts = {job["contract_name"] for job in jobs if "contract_name" in job}
overlap = set(include).difference(found_contracts)
if overlap:
raise click.UsageError(
f"The following contracts could not be found: {', '.join(overlap)}"
)
jobs = [job for job in jobs if job["contract_name"] in include]
jobs = [job for job in jobs if "contract_name" in job if job["contract_name"] in include]

# filter jobs where no bytecode was produced
LOGGER.debug(f"Filtering {len(jobs)} job(s) for empty bytecode")
Expand Down