X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfatables%2Fruntime.py;h=b7c3444d362ba4d0d7798a956bffb4ad514a428f;hb=a0ef6e7c91c3c8fa376943d28fec8c5c204a78cd;hp=e22967c783f55998dbe073a982866bf545b8755a;hpb=e39e728991b762ae0b52b52b06655f0c7f1b7421;p=sfa.git diff --git a/sfatables/runtime.py b/sfatables/runtime.py index e22967c7..b7c3444d 100644 --- a/sfatables/runtime.py +++ b/sfatables/runtime.py @@ -56,8 +56,8 @@ class SFATablesRules: def add_request_context_to_rspec(self, doc): p = doc.xpathNewContext() - context = p.xpathEval("//RSpec") - if (not context): + context = p.xpathEval("//*") + if not context or context[0].name not in ['RSpec', 'rspec']: raise Exception('Request is not an rspec') else: # Add the request context