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:
Erik Berg 2021-08-09 10:57:57 +02:00
parent 516d9c1d93
commit 7111aa75f9
1 changed files with 1 additions and 1 deletions

View File

@ -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)