summaryrefslogtreecommitdiffstats
path: root/cython/lockdown.pxi
diff options
context:
space:
mode:
authorGravatar Bryan Forbes2010-04-29 13:59:21 -0500
committerGravatar Martin Szulecki2012-03-20 23:25:55 +0100
commit74943414c8e04a92f42dcbc4fac1599c7f9deed2 (patch)
tree05d0dfd67989a0f7f850aedd797c41a7dd575ee8 /cython/lockdown.pxi
parent49fc86155ca2ec847239f7969ac190dfe7aa4920 (diff)
downloadlibimobiledevice-74943414c8e04a92f42dcbc4fac1599c7f9deed2.tar.gz
libimobiledevice-74943414c8e04a92f42dcbc4fac1599c7f9deed2.tar.bz2
Used issubclass to determine if a class object can be passed.
Diffstat (limited to 'cython/lockdown.pxi')
-rw-r--r--cython/lockdown.pxi2
1 files changed, 1 insertions, 1 deletions
diff --git a/cython/lockdown.pxi b/cython/lockdown.pxi
index f8955e5..be9d25f 100644
--- a/cython/lockdown.pxi
+++ b/cython/lockdown.pxi
@@ -164,7 +164,7 @@ cdef class LockdownClient(PropertyListService):
char* c_service_name = NULL
uint16_t port = 0
- if hasattr(service, '__service_name__') and \
+ if issubclass(service, BaseService) and \
service.__service_name__ is not None \
and isinstance(service.__service_name__, basestring):
c_service_name = <bytes>service.__service_name__