From 58af62f543bbb0e66247a37dae36698d9fa5d338 Mon Sep 17 00:00:00 2001 From: "Daniel M. Pelt" Date: Thu, 9 Jul 2015 23:13:44 +0200 Subject: Allow plugins without keywords --- python/astra/plugin.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'python/astra') diff --git a/python/astra/plugin.py b/python/astra/plugin.py index bbbc450..be5c155 100644 --- a/python/astra/plugin.py +++ b/python/astra/plugin.py @@ -33,7 +33,10 @@ class base(object): def astra_init(self, cfg): try: args, varargs, varkw, defaults = inspect.getargspec(self.initialize) - nopt = len(defaults) + if not defaults is None: + nopt = len(defaults) + else: + nopt = 0 if nopt>0: req = args[2:-nopt] opt = args[-nopt:] -- cgit v1.2.3