Changeset 2396f591
- Timestamp:
- Jun 15, 2011 6:18:41 PM (14 years ago)
- Branches:
- axis_example, compt_changes, info-ops, master
- Children:
- 9b76f1a, cedf721
- Parents:
- b56eb7e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/fedd_image.py
rb56eb7e r2396f591 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.