Use correct keys when dealing with the defaults dict

When checking the defaults dict the keys "m_name" and "m_fun" are already renamed to "name" and "fun" so us arg instead of rarg
This commit is contained in:
Anders Betnér 2013-08-01 21:36:08 +02:00
parent ed2e414512
commit 3e4543a6b7

View File

@ -104,11 +104,11 @@ def run(name, **kwargs):
rarg = 'm_fun'
else:
rarg = arg
if rarg not in kwargs and rarg not in defaults:
if rarg not in kwargs and arg not in defaults:
missing.add(rarg)
continue
if rarg in defaults:
args.append(defaults[rarg])
if arg in defaults:
args.append(defaults[arg])
else:
args.append(kwargs.pop(rarg))
if missing: