comparison sat_frontends/jp/cmd_encryption.py @ 3102:7574f795bd1e

core, bridge: encryptionPluginsGet now returns a serialised list + added "directed" in metadata
author Goffi <goffi@goffi.org>
date Mon, 30 Dec 2019 20:44:04 +0100
parents fee60f17ebac
children 9d0df638c8b4
comparison
equal deleted inserted replaced
3101:ab7e8ade848a 3102:7574f795bd1e
47 self.disp(_("Following encryption algorithms are available: {algos}").format( 47 self.disp(_("Following encryption algorithms are available: {algos}").format(
48 algos=', '.join([p['name'] for p in plugins]))) 48 algos=', '.join([p['name'] for p in plugins])))
49 49
50 async def start(self): 50 async def start(self):
51 try: 51 try:
52 plugins = await self.host.bridge.encryptionPluginsGet() 52 plugins_ser = await self.host.bridge.encryptionPluginsGet()
53 plugins = data_format.deserialise(plugins_ser, type_check=list)
53 except Exception as e: 54 except Exception as e:
54 self.disp(f"can't retrieve plugins: {e}", error=True) 55 self.disp(f"can't retrieve plugins: {e}", error=True)
55 self.host.quit(C.EXIT_BRIDGE_ERRBACK) 56 self.host.quit(C.EXIT_BRIDGE_ERRBACK)
56 else: 57 else:
57 await self.output(plugins) 58 await self.output(plugins)