Skip to content

Commit

Permalink
Removed dead code
Browse files Browse the repository at this point in the history
Unless I'm mistaken, there is no way that `value` can be an instance of ConfigList or ConfigTree.

`ConfigList` is a subclass of `list`, `ConfigTree` is a subclass of `OrderedDict`.
There are no assignments to `os.environ`, nor can these types be assigned to `os.environ` anyway.

See http://stackoverflow.com/questions/39949587/can-python-os-environ-get-ever-return-a-non-string for a discussion.
  • Loading branch information
movermeyer authored Oct 9, 2016
1 parent 8ea07eb commit c0dba4f
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions pyhocon/config_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,14 +297,6 @@ def _resolve_variable(config, substitution):
variable=variable,
line=lineno(substitution.loc, substitution.instring),
col=col(substitution.loc, substitution.instring)))
elif isinstance(value, ConfigList) or isinstance(value, ConfigTree):
raise ConfigSubstitutionException(
"Cannot substitute variable ${{{variable}}} because it does not point to a "
"string, int, float, boolean or null {type} (line:{line}, col: {col})".format(
variable=variable,
type=value.__class__.__name__,
line=lineno(substitution.loc, substitution.instring),
col=col(substitution.loc, substitution.instring)))
return True, value

@staticmethod
Expand Down

0 comments on commit c0dba4f

Please sign in to comment.