Skip to content

Commit

Permalink
Add detailed error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
daveneeley committed Dec 3, 2015
1 parent 811564a commit 77f602f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions salt/modules/rdp.py
Expand Up @@ -17,7 +17,7 @@ def __virtual__():
'''
if salt.utils.is_windows():
return 'rdp'
return False
return (False, 'Module only works on Windows.')


def _parse_return_code_powershell(string):
Expand All @@ -27,7 +27,7 @@ def _parse_return_code_powershell(string):

regex = re.search(r'ReturnValue\s*: (\d*)', string)
if not regex:
return False
return (False, 'Could not parse PowerShell return code.')
else:
return int(regex.group(1))

Expand Down

0 comments on commit 77f602f

Please sign in to comment.