mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
Merge pull request #11838 from cchurch/stringify_powershell_unquote_value
Fix for PowerShell unquote method when passed None.
This commit is contained in:
@@ -126,6 +126,7 @@ class ShellModule(object):
|
||||
|
||||
def _unquote(self, value):
|
||||
'''Remove any matching quotes that wrap the given value.'''
|
||||
value = to_unicode(value or '')
|
||||
m = re.match(r'^\s*?\'(.*?)\'\s*?$', value)
|
||||
if m:
|
||||
return m.group(1)
|
||||
|
||||
Reference in New Issue
Block a user