summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cython/lockdown.pxi6
1 files changed, 3 insertions, 3 deletions
diff --git a/cython/lockdown.pxi b/cython/lockdown.pxi
index f249049..1bf7072 100644
--- a/cython/lockdown.pxi
+++ b/cython/lockdown.pxi
@@ -230,9 +230,9 @@ cdef class LockdownClient(PropertyListService):
230 230
231 if issubclass(service, BaseService) and \ 231 if issubclass(service, BaseService) and \
232 service.__service_name__ is not None \ 232 service.__service_name__ is not None \
233 and isinstance(service.__service_name__, basestring): 233 and isinstance(service.__service_name__, (str, bytes)):
234 c_service_name = <bytes>service.__service_name__ 234 c_service_name = <bytes>service.__service_name__
235 elif isinstance(service, basestring): 235 elif isinstance(service, (str, bytes)):
236 c_service_name = <bytes>service 236 c_service_name = <bytes>service
237 else: 237 else:
238 raise TypeError("LockdownClient.start_service() takes a BaseService or string as its first argument") 238 raise TypeError("LockdownClient.start_service() takes a BaseService or string as its first argument")
@@ -253,7 +253,7 @@ cdef class LockdownClient(PropertyListService):
253 253
254 if not hasattr(service_class, '__service_name__') and \ 254 if not hasattr(service_class, '__service_name__') and \
255 not service_class.__service_name__ is not None \ 255 not service_class.__service_name__ is not None \
256 and not isinstance(service_class.__service_name__, basestring): 256 and not isinstance(service_class.__service_name__, (str, bytes)):
257 raise TypeError("LockdownClient.get_service_client() takes a BaseService as its first argument") 257 raise TypeError("LockdownClient.get_service_client() takes a BaseService as its first argument")
258 258
259 descriptor = self.start_service(service_class) 259 descriptor = self.start_service(service_class)