blob: 1ba7137d321cdd72a63bb36f0f1dca9464ea8520 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#!/usr/bin/python2
def get_os_name(name):
try: return name.split(' ')[0].lower()
except: pass
def select_with_attribute(iterable, attribute, result=True):
return [value for value in iterable if (attribute in value) == result]
filters = [
('select_with_attribute', select_with_attribute),
('get_os_name', get_os_name)
]
|