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 commit 7111aa75f9)
(cherry picked from commit 7ff77f8225)
(cherry picked from commit 99f8e1b458)
This commit is contained in:
Erik Berg 2021-08-09 10:57:57 +02:00 committed by Ebbex
parent 7ed46e2b00
commit b4be9b148a
1 changed files with 1 additions and 1 deletions

View File

@ -123,7 +123,7 @@ Puppet::Type.type(:nova_aggregate).provide(
end end
def self.pythondict2hash(input) def self.pythondict2hash(input)
return JSON.parse(input.gsub(/u'(\w*)'/, '"\1"').gsub(/'/, '"')) return JSON.parse(input.gsub(/u'([^']*)'/, '"\1"').gsub(/'/, '"'))
end end
def self.parsestring(input) def self.parsestring(input)