snermolaev 1 год назад
Родитель
Сommit
d815c46d91
2 измененных файлов с 5 добавлено и 3 удалено
  1. 2 2
      build/plugins/_common.py
  2. 3 1
      build/plugins/ssqls.py

+ 2 - 2
build/plugins/_common.py

@@ -26,8 +26,8 @@ def pathid(path):
     return six.ensure_str(base64.b32encode(hashlib.md5(six.ensure_binary(path)).digest()).lower().strip(b'='))
 
 
-def listid(l):
-    return pathid(str(sorted(l)))
+def listid(items):
+    return pathid(str(sorted(items)))
 
 
 def unpair(lst):

+ 3 - 1
build/plugins/ssqls.py

@@ -23,7 +23,9 @@ class SSQLSParser(object):
 
     @staticmethod
     def parse_doc(doc):
-        paths = lambda nodes: filter(None, (e.get('path') for e in nodes))
+        def paths(nodes):
+            return [x for x in (e.get('path') for e in nodes) if x]
+
         includes = doc.findall('include')
         ancestors = paths(doc.findall('ancestors/ancestor'))
         headers = [e.text.strip('<>""') for e in includes]