Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -r e9feb78ccbee inv/models/interfaceclassificationrule.py
- --- a/inv/models/interfaceclassificationrule.py Thu Jul 10 14:48:25 2014 +0400
- +++ b/inv/models/interfaceclassificationrule.py Thu Jul 10 15:40:27 2014 +0400
- @@ -80,13 +80,7 @@
- " return iface.description.lower() == %s" % repr(self.value.lower())
- ])
- - def compile_description_contains(self, f_name):
- - return "\n".join([
- - "def %s(iface):" % f_name,
- - " return iface.description and %s in iface.description.lower()" % repr(self.value.lower())
- - ])
- -
- - def compile_description_regex(self, f_name):
- + def compile_description_regexp(self, f_name):
- return "\n".join([
- "rx_%s = re.compile(%s, re.IGNORECASE)" % (f_name, repr(self.value1)),
- "def %s(iface):" % f_name,
- @@ -212,7 +206,7 @@
- r = ["import re"]
- mf = [
- "gsc = {}",
- - "def classify(cls, interface):",
- + "def classify(interface):",
- " def in_selector(o, s):",
- " if s in s_cache:",
- " return s_cache[s]",
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement