summaryrefslogtreecommitdiffstats
path: root/func/minion/modules/netapp
diff options
context:
space:
mode:
Diffstat (limited to 'func/minion/modules/netapp')
-rw-r--r--func/minion/modules/netapp/common.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/func/minion/modules/netapp/common.py b/func/minion/modules/netapp/common.py
index ab63cbc..d041336 100644
--- a/func/minion/modules/netapp/common.py
+++ b/func/minion/modules/netapp/common.py
@@ -2,7 +2,9 @@ import subprocess
SSH = '/usr/bin/ssh'
-class GenericSSHException(Exception): pass
+class GenericSSHError(Exception): pass
+class NetappCommandError(Exception): pass
+class NetappNotImplementedError(Exception): pass
def ssh(user, host, command):
cmd = subprocess.Popen([SSH, "%s@%s" % (user, host), command],
@@ -13,8 +15,7 @@ def ssh(user, host, command):
shell=False)
(out, err) = cmd.communicate()
-
- if err:
- raise GenericSSHException, err
+ if cmd.wait() != 0:
+ raise GenericSSHError, err
else:
return out