Allow for a more permissible regex
Some openstack installations use characters that are not in \w, the old regex, now moved to string2hash was more permissible, and there's probably no reason the regex in pythondict2hash can't be just as permissible. Change-Id: I35b964d96e6a558f1a10daa2391a398db60ea800
This commit is contained in:
parent
516d9c1d93
commit
7111aa75f9
|
@ -123,7 +123,7 @@ Puppet::Type.type(:nova_aggregate).provide(
|
|||
end
|
||||
|
||||
def self.pythondict2hash(input)
|
||||
return JSON.parse(input.gsub(/u'(\w*)'/, '"\1"').gsub(/'/, '"'))
|
||||
return JSON.parse(input.gsub(/u'([^']*)'/, '"\1"').gsub(/'/, '"'))
|
||||
end
|
||||
|
||||
def self.parsestring(input)
|
||||
|
|
Loading…
Reference in New Issue