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

Fixed missing file key in ConfigBuilder #1312

Merged
merged 3 commits into from
Oct 16, 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
3 changes: 1 addition & 2 deletions ipv8/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,7 @@ def add_key_from_bin(self, alias: str, key_bin_b64: str, file_path: str | None =
'alias': alias,
'bin': key_bin_b64
}
if file_path is not None:
key_config['file'] = file_path
key_config['file'] = file_path or ""
self.config['keys'].append(key_config)
return self

Expand Down
3 changes: 2 additions & 1 deletion ipv8/test/test_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ def test_add_key_from_bin(self) -> None:

expected = {
'alias': "my new key",
'bin': key_material
'bin': key_material,
'file': ""
}
keys = builder.finalize()['keys']

Expand Down