From: Mark Wooding Date: Sun, 25 Dec 2011 23:58:43 +0000 (+0000) Subject: extract-profile.in: Property name fixup wasn't applied to ${...} tokens. X-Git-Tag: 0.99.1~12 X-Git-Url: https://git.distorted.org.uk/~mdw/distorted-keys/commitdiff_plain/ddf8e79a6a93d1db6bf3c30d8991e86836a11d69 extract-profile.in: Property name fixup wasn't applied to ${...} tokens. Move it into the common replacement code. --- diff --git a/extract-profile.in b/extract-profile.in index c3a224b..dc816f3 100755 --- a/extract-profile.in +++ b/extract-profile.in @@ -279,7 +279,7 @@ class Section (object, UD.DictMixin): left = dol + 1 while left < n and (string[left].isalnum() or string[left] in '-_'): left += 1 - prop = string[dol + 1:left].replace('-', '_') + prop = string[dol + 1:left] ## If we came up empty, report an error. if prop == '': @@ -287,6 +287,7 @@ class Section (object, UD.DictMixin): "invalid placeholder (empty name) in `%s'" % string ## Extend the path: we're going to do a recursive expansion. + prop = prop.replace('-', '_') path.append(prop) ## Report a cycle if we found one.