- chain = chain.upper()
- rules = SFATablesRules(chain)
- if rules.sorted_rule_list:
- contexts = rules.contexts
- request_context = context_callback(hrn, origin_hrn, contexts)
- rules.set_context(request_context)
- newrspec = rules.apply(rspec)
- else:
- newrspec = rspec
- return newrspec
+ chain = chain.upper()
+ rules = SFATablesRules(chain)
+ if rules.sorted_rule_list:
+ contexts = rules.contexts
+ request_context = context_callback(hrn, origin_hrn, contexts)
+ rules.set_context(request_context)
+ newrspec = rules.apply(rspec)
+ else:
+ newrspec = rspec
+ return newrspec
+
+except:
+
+ from sfa.util.sfalogging import logger
+ def run_sfatables (_,__,___, rspec, ____=None):
+ logger.warning("Cannot import sfatables.runtime, please install package sfa-sfatables")
+ return rspec