diff --git a/devsupApp/src/dbdset.c b/devsupApp/src/dbdset.c index deeab2a..f2987a3 100644 --- a/devsupApp/src/dbdset.c +++ b/devsupApp/src/dbdset.c @@ -122,7 +122,7 @@ static int allow_ioscan(pyDevice *priv) static void release_ioscan(pyDevice *priv) { - if(priv->scanobj && PyObject_HasAttrString(priv->scanobj, "release")) { + if(priv->scanobj && PyCallable_Check(priv->scanobj)) { PyObject *ret = PyObject_CallFunction(priv->scanobj, "O", priv->pyrecord); if(ret) Py_DECREF(ret); diff --git a/python/devsup/interfaces.py b/python/devsup/interfaces.py index 5be1b0a..ec5c8c9 100644 --- a/python/devsup/interfaces.py +++ b/python/devsup/interfaces.py @@ -11,6 +11,11 @@ class DeviceSupport(Interface): def allowScan(record): """Return True to allow SCAN='I/O Intr' or False to prevent this. + + If a callable object is returned then if + will be invoked when I/O Intr scanning + is disabled. A Record instance is passed + as the first (and only) argument. """ def process(record, reason):