Skip to content

Commit

Permalink
Make constructor application more strict for attribute based placehol…
Browse files Browse the repository at this point in the history
…ders
  • Loading branch information
Alec Deason committed Sep 13, 2017
1 parent cc246c6 commit 1103f7f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vivarium/framework/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,9 +276,9 @@ def _prep_components(component_list: Sequence, constructors: Mapping[str, Callab
component = _import_by_path(component)

for attr, val in inspect.getmembers(component, lambda a: not inspect.isroutine(a)):
constructor = constructors.get(val.__class__.__name__)
constructor = constructors.get(val.__class__)
if constructor:
setattr(component, attr, constructor(val.entity_path))
setattr(component, attr, constructor(val))

# Establish the initial configuration
if hasattr(component, 'configuration_defaults'):
Expand Down

0 comments on commit 1103f7f

Please sign in to comment.