Skip to content

Commit

Permalink
Merge pull request #1312 from mg98/fix/configbuilder-file-key
Browse files Browse the repository at this point in the history
Fix missing file key in ConfigBuilder
  • Loading branch information
qstokkink authored Oct 16, 2024
2 parents a9330c8 + adf622e commit 254eb86
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
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

0 comments on commit 254eb86

Please sign in to comment.