Guest User

Untitled

a guest
Jul 10th, 2014
216
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. diff -r e9feb78ccbee inv/models/interfaceclassificationrule.py
  2. --- a/inv/models/interfaceclassificationrule.py Thu Jul 10 14:48:25 2014 +0400
  3. +++ b/inv/models/interfaceclassificationrule.py Thu Jul 10 15:40:27 2014 +0400
  4. @@ -80,13 +80,7 @@
  5. " return iface.description.lower() == %s" % repr(self.value.lower())
  6. ])
  7.  
  8. - def compile_description_contains(self, f_name):
  9. - return "\n".join([
  10. - "def %s(iface):" % f_name,
  11. - " return iface.description and %s in iface.description.lower()" % repr(self.value.lower())
  12. - ])
  13. -
  14. - def compile_description_regex(self, f_name):
  15. + def compile_description_regexp(self, f_name):
  16. return "\n".join([
  17. "rx_%s = re.compile(%s, re.IGNORECASE)" % (f_name, repr(self.value1)),
  18. "def %s(iface):" % f_name,
  19. @@ -212,7 +206,7 @@
  20. r = ["import re"]
  21. mf = [
  22. "gsc = {}",
  23. - "def classify(cls, interface):",
  24. + "def classify(interface):",
  25. " def in_selector(o, s):",
  26. " if s in s_cache:",
  27. " return s_cache[s]",
RAW Paste Data