diff options
author | Daniel M. Pelt <D.M.Pelt@cwi.nl> | 2015-07-09 23:13:44 +0200 |
---|---|---|
committer | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2015-07-23 11:57:16 +0200 |
commit | 58af62f543bbb0e66247a37dae36698d9fa5d338 (patch) | |
tree | 4503d529a557627e041b263098c8dbf56cf5b146 /python/astra | |
parent | edae78481cf0e9cbffe335de1e541821758c5da1 (diff) | |
download | astra-58af62f543bbb0e66247a37dae36698d9fa5d338.tar.gz astra-58af62f543bbb0e66247a37dae36698d9fa5d338.tar.bz2 astra-58af62f543bbb0e66247a37dae36698d9fa5d338.tar.xz astra-58af62f543bbb0e66247a37dae36698d9fa5d338.zip |
Allow plugins without keywords
Diffstat (limited to 'python/astra')
-rw-r--r-- | python/astra/plugin.py | 5 |
1 files changed, 4 insertions, 1 deletions
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:] |