Skip to content

Commit

Permalink
allow for inline comments in config file
Browse files Browse the repository at this point in the history
  • Loading branch information
jchiang87 committed Aug 18, 2018
1 parent bdf17cd commit e2c72ea
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions python/desc/imsim/imSim.py
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,9 @@ def cast(value):
None, int, float, bool, str
Depending on the first workable cast, in that order.
"""
# Remove any inline comments after a '#' delimiter.
value = value.split('#')[0].strip()

if value == 'None':
return None
try:
Expand Down

0 comments on commit e2c72ea

Please sign in to comment.