def send_command(cmd, params):
    import jsonrpclib
    server = jsonrpclib.Server((my_host, my_port)%'http://%s:%d')
    try:
        if cmd == 'request':
            out = server.request(*params)
        elif cmd == 'stop':
            out = server.stop(*params)
        else:
            out = "unknown command"
    except socket.error:
        print "Server not running"
        return 1

    print out
    return 0
dataset/ETHPy150Open bitxbay/BitXBay/electru/scripts/merchant/merchant.py/send_command/swapped operands of `%`