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 (cherry picked from commit7111aa75f9
) (cherry picked from commit7ff77f8225
)
This commit is contained in:
parent
3fab23231c
commit
99f8e1b458
|
@ -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