Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem: KeyError occurs from netifaces #1481

Merged
merged 4 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion testground/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ $ TESTGROUND_HOME=$PWD/data testground plan import --from /path/to/cronos/testgr
Run the benchmark test plan in local docker environment:

```bash
$ testground run composition -f /path/to/cronos/testground/benchmark/compositions/local.toml --wait
$ TESTGROUND_HOME=$PWD/data testground run composition -f /path/to/cronos/testground/benchmark/compositions/local.toml --wait
```

### macOS
Expand Down
2 changes: 1 addition & 1 deletion testground/benchmark/benchmark/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ def get_data_ip(params: RunParams) -> ipaddress.IPv4Address:
def ip4_addresses() -> List[ipaddress.IPv4Address]:
ip_list = []
for interface in netifaces.interfaces():
for link in netifaces.ifaddresses(interface)[netifaces.AF_INET]:
for link in netifaces.ifaddresses(interface).get(netifaces.AF_INET, []):
ip_list.append(ipaddress.IPv4Address(link["addr"]))
return ip_list
Loading