|
@@ -23,8 +23,10 @@ class LeQuery(object):
|
23
|
23
|
from .leobject import LeObject
|
24
|
24
|
if self._hook_prefix is None:
|
25
|
25
|
raise NotImplementedError("Abstract class")
|
26
|
|
- if not issubclass(target_class, LeObject):
|
27
|
|
- raise TypeError("target class has to be a child class of LeObject")
|
|
26
|
+ if not inspect.isclass(target_class) or \
|
|
27
|
+ not issubclass(target_class, LeObject):
|
|
28
|
+ raise TypeError("target class has to be a child class of LeObject \
|
|
29
|
+but %s given"% target_class)
|
28
|
30
|
self._target_class = target_class
|
29
|
31
|
self._ro_datasource = target_class._ro_datasource
|
30
|
32
|
self._rw_datasource = target_class._rw_datasource
|