summaryrefslogtreecommitdiffstats
path: root/python/astra
diff options
context:
space:
mode:
authorDaniel M. Pelt <D.M.Pelt@cwi.nl>2015-07-09 23:13:44 +0200
committerWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2015-07-23 11:57:16 +0200
commit58af62f543bbb0e66247a37dae36698d9fa5d338 (patch)
tree4503d529a557627e041b263098c8dbf56cf5b146 /python/astra
parentedae78481cf0e9cbffe335de1e541821758c5da1 (diff)
downloadastra-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.py5
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:]