diff options
Diffstat (limited to 'cython')
-rw-r--r-- | cython/lockdown.pxi | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cython/lockdown.pxi b/cython/lockdown.pxi index 1bf7072..6b88f9d 100644 --- a/cython/lockdown.pxi +++ b/cython/lockdown.pxi @@ -231,11 +231,12 @@ cdef class LockdownClient(PropertyListService): if issubclass(service, BaseService) and \ service.__service_name__ is not None \ and isinstance(service.__service_name__, (str, bytes)): - c_service_name = <bytes>service.__service_name__ + c_service_name_str = service.__service_name__.encode('utf-8') elif isinstance(service, (str, bytes)): - c_service_name = <bytes>service + c_service_name_str = service.encode('utf-8') else: raise TypeError("LockdownClient.start_service() takes a BaseService or string as its first argument") + c_service_name = c_service_name_str try: self.handle_error(lockdownd_start_service(self._c_client, c_service_name, &c_descriptor)) |