diff options
author | drebs <drebs@leap.se> | 2012-12-24 11:42:13 -0200 |
---|---|---|
committer | drebs <drebs@leap.se> | 2012-12-24 11:42:13 -0200 |
commit | 40e738f3c8275edd61a7f98cfbd2f4cadfb23332 (patch) | |
tree | 1dd30a15def68604ad33102e020a1130c5ae5021 | |
parent | 15198a7473398a6aa66ac4ab8d6da70bda745bf7 (diff) |
Add send_keys to GPGWrapper
-rw-r--r-- | util.py | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -40,12 +40,19 @@ class GPGWrapper(gnupg.GPG): always_trust=always_trust, passphrase=passphrase) - def send_keys(self, keys, keyserver): + def send_keys(self, keyserver, *keyids): """ Send keys to a keyserver. """ - pass - + result = self.result_map['list'](self) + logger.debug('send_keys: %r', keyids) + data = _make_binary_stream("", self.encoding) + args = ['--keyserver', keyserver, '--send-keys'] + args.extend(keyids) + self._handle_io(args, data, result, binary=True) + logger.debug('send_keys result: %r', result.__dict__) + data.close() + return result #---------------------------------------------------------------------------- |