Skip to content
This repository has been archived by the owner on Dec 27, 2022. It is now read-only.

Fix Py2k method name type #45

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion mprpc/client.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import msgpack
import time
import sys
from gevent import socket
from gsocketpool.connection import Connection

Expand Down Expand Up @@ -120,12 +121,16 @@ cdef class RPCClient:
else:
return False

def call(self, str method, *args):
def call(self, str method_str, *args):
"""Calls a RPC method.

:param str method: Method name.
:param args: Method arguments.
"""
if sys.version_info.major >= 3:
method = method_str
else:
method = unicode(method_str)

cdef bytes req = self._create_request(method, args)

Expand Down