Skip to content

Commit

Permalink
Remove type from dropspect after extraction
Browse files Browse the repository at this point in the history
The 'type' valye from the dropspec is only needed at this point, and therefore
it should be removed from the dictionary after usage. Failing to do so (as we
were doing until now) means that it will make its way down to the drop class'
initialization parameters, which users can erroneously use.

Signed-off-by: Rodrigo Tobar <rtobar@icrar.org>
  • Loading branch information
rtobar committed Jun 21, 2017
1 parent 6ad6b5f commit 5e84505
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dfms/graph_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def createGraphFromDropSpecList(dropSpecList):
for n,dropSpec in enumerate(dropSpecList):

check_dropspec(n, dropSpec)
dropType = dropSpec['type']
dropType = dropSpec.pop('type')

cf = __CREATION_FUNCTIONS[dropType]
drop = cf(dropSpec)
Expand Down

0 comments on commit 5e84505

Please sign in to comment.