Skip to content

Commit

Permalink
Fix python 2.6 compatibility issue
Browse files Browse the repository at this point in the history
  • Loading branch information
gilles-duboscq committed May 4, 2016
1 parent c692045 commit fa7ad25
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pyhocon/config_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,8 @@ def _fixup_self_references(config):
continue # If value is present in latest version, don't do anything
if prop_path[0] == key:
if isinstance(previous_item, ConfigValues): # We hit a dead end, we cannot evaluate
raise ConfigSubstitutionException("Property {} cannot be substituted. Check for cycles.".format(substitution.variable))
raise ConfigSubstitutionException("Property {variable} cannot be substituted. Check for cycles.".format(
variable=substitution.variable))
value = previous_item if len(prop_path) == 1 else previous_item.get(".".join(prop_path[1:]))
(_, _, current_item) = ConfigParser._do_substitute(substitution, value)
previous_item = current_item
Expand Down

0 comments on commit fa7ad25

Please sign in to comment.