diff --git a/appPublic/registerfunction.py b/appPublic/registerfunction.py index a932ea3..98db70c 100755 --- a/appPublic/registerfunction.py +++ b/appPublic/registerfunction.py @@ -1,4 +1,4 @@ - +from inspect import isfunction, isroutinefunction from functools import partial from appPublic.Singleton import SingletonDecorator @@ -8,6 +8,9 @@ class RegisterFunction: self.registKW = {} def register(self,name,func): + if not isfunction(func) and not isroutinefunction(func): + error(f'RegisterFunction.register({name}, {func}): func is not a function or routine') + return self.registKW[name] = func def get(self,name):