Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def align_server(index, port, aligner, opts=''):
bind = 'tcp://127.0.0.1:{}'.format(port)
if aligner == 'minimap':
server = yield from rpc.serve_rpc(
MiniMapServe(index[0], map_opts=opts), bind=bind
)
else:
raise ValueError("Unknown aligner '{}'.".format(aligner))
return server