From 71f96c9c9e340f7dcf68a0c95525c3cf2872c104 Mon Sep 17 00:00:00 2001 From: meejah Date: Tue, 27 Nov 2018 15:01:01 -0700 Subject: [PATCH] call super properly; docstring --- src/allmydata/scripts/tahoe_grid_manager.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/allmydata/scripts/tahoe_grid_manager.py b/src/allmydata/scripts/tahoe_grid_manager.py index ee6080174..f2c3aace6 100644 --- a/src/allmydata/scripts/tahoe_grid_manager.py +++ b/src/allmydata/scripts/tahoe_grid_manager.py @@ -39,7 +39,7 @@ class AddOptions(BaseOptions): ) def getSynopsis(self): - return "{} add NAME PUBLIC_KEY".format(BaseOptions.getSynopsis()) + return "{} add NAME PUBLIC_KEY".format(super(AddOptions, self).getSynopsis()) def parseArgs(self, *args, **kw): BaseOptions.parseArgs(self, **kw) @@ -128,7 +128,13 @@ class GridManagerOptions(BaseOptions): def _create_gridmanager(): - return _GridManager(ed25519.SigningKey(os.urandom(32)), {}) + """ + :return: an object providing the GridManager interface initialized + with a new random keypair + """ + private_key_bytes, public_key_bytes = keyutil.make_keypair() + secret_key, public_key_bytes = keyutil.parse_privkey(private_key_bytes) + return _GridManager(secret_key, {}) def _create(gridoptions, options): """