def get_provides exists Return list of available objects key_exists _e

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
def get_provides(exists):
"""
Return list of available objects
"""
key_exists = _expand_exists(exists)
superset = None
for key in key_exists:
if superset is None:
superset = PROVIDES[key]
superset = superset.union(PROVIDES[key])
available = []
for skey in superset:
b = props.NewBuilding(*skey)
if not get_requires(b, exists) and not skey in key_exists:
available.append(skey)
return available