- Timestamp:
- Jun 15, 2011 6:20:27 PM (13 years ago)
- Branches:
- compt_changes, info-ops, master
- Children:
- c410811a
- Parents:
- 37ecf7e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/fedd_image.py
r37ecf7e r0df7881 71 71 add_to_map(sg, e.get_attribute(attr) or 'default', e) 72 72 elif isinstance(e, topdl.Substrate): 73 # A little hairy. Make a set of the values of the given attribute 73 # A little hairy. If the substrate itself has the attribute, use 74 # that. Otherwise, make a set of the values of the given attribute 74 75 # for all the elements in the substrate's interfaces. If that set 75 76 # has one element, put the substrate in that subgraph. Otherwise 76 77 # put it in default. 77 atts = set([i.element.get_attribute(attr) or 'default' \ 78 for i in e.interfaces]) 79 80 if len(atts) == 1: add_to_map(sg, atts.pop(), e) 81 else: add_to_map(sg, 'default', e) 78 79 sa = e.get_attribute(attr) 80 if sa is not None: 81 add_to_map(sg, sa, e) 82 else: 83 atts = set([i.element.get_attribute(attr) or 'default' \ 84 for i in e.interfaces]) 85 86 if len(atts) == 1: add_to_map(sg, atts.pop(), e) 87 else: add_to_map(sg, 'default', e) 82 88 83 89 if rest:
Note: See TracChangeset
for help on using the changeset viewer.