mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Remove Ruby port of list intersection
This commit is contained in:
parent
9ee623b15d
commit
2f0c40a0dc
@ -328,17 +328,12 @@ class Inspector(EnvLoader):
|
||||
'''
|
||||
Get the intersection between all files and managed files.
|
||||
'''
|
||||
def intr(src, data):
|
||||
out = set()
|
||||
for d_el in data:
|
||||
if d_el not in src:
|
||||
out.add(d_el)
|
||||
return out
|
||||
|
||||
m_files, m_dirs, m_links = managed
|
||||
s_files, s_dirs, s_links = system_all
|
||||
|
||||
return sorted(intr(m_files, s_files)), sorted(intr(m_dirs, s_dirs)), sorted(intr(m_links, s_links))
|
||||
return (sorted(list(set(s_files).intersection(m_files))),
|
||||
sorted(list(set(s_dirs).intersection(m_dirs))),
|
||||
sorted(list(set(s_links).intersection(m_links))))
|
||||
|
||||
def _scan_payload(self):
|
||||
'''
|
||||
|
Loading…
Reference in New Issue
Block a user