X-Git-Url: http://git.onelab.eu/?p=sfa.git;a=blobdiff_plain;f=sfatables%2Fcommands%2FAdd.py;h=e7657ffff79361667daae388972295c404b7580f;hp=fc5ed719190fb5015b8d36b6b4872b1a0031a88e;hb=f2c5cd033b7f43896a32fca67f79f2979af1c44f;hpb=8489bbb567421a18698c5b21ea39da35fcf01f62 diff --git a/sfatables/commands/Add.py b/sfatables/commands/Add.py index fc5ed719..e7657fff 100644 --- a/sfatables/commands/Add.py +++ b/sfatables/commands/Add.py @@ -41,7 +41,7 @@ class Add(Command): option_name = option['name'] option_value = getattr(options,option_name) - if (hasattr(options,option_name) and options.option_name): + if (hasattr(options,option_name) and getattr(options,option_name)): context = p.xpathEval("//rule[@element='%s' or @element='*']/argument[name='%s']"%(element, option_name)) if (not context): raise Exception('Unknown option %s for match %s and element %s'%(option,option['name'], element))