Added project specific exceptions

This commit is contained in:
Maxim Kulkin 2013-10-22 14:58:35 +04:00
parent 9105607114
commit 5d02390b6a
2 changed files with 4 additions and 1 deletions

View File

@ -13,6 +13,7 @@ import joker
from ostack_validator.common import Issue, index, path_relative_to
from ostack_validator.model import *
from ostack_validator.exceptions import ValidatorException
class SshShell(spur.SshShell):
@ -38,7 +39,7 @@ class SshShell(spur.SshShell):
try:
self._pkey = DSSKey.from_private_key(StringIO(private_key))
except SSHException:
raise "Unknown private key format"
raise ValidatorException("Unknown private key format")
self._sock = sock

View File

@ -0,0 +1,2 @@
class ValidatorException(BaseException):
pass