Fix for PowerShell unquote method when passed None.

This commit is contained in:
Chris Church 2015-08-02 18:38:29 -04:00
parent 6d514e18b7
commit cafc35fd5b
2 changed files with 12 additions and 0 deletions

View file

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