From 74943414c8e04a92f42dcbc4fac1599c7f9deed2 Mon Sep 17 00:00:00 2001 From: Bryan Forbes Date: Thu, 29 Apr 2010 13:59:21 -0500 Subject: Used issubclass to determine if a class object can be passed. --- cython/lockdown.pxi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cython') 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 = service.__service_name__ -- cgit v1.1-32-gdbae