Added project specific exceptions
This commit is contained in:
parent
9105607114
commit
5d02390b6a
ostack_validator
@ -13,6 +13,7 @@ import joker
|
|||||||
|
|
||||||
from ostack_validator.common import Issue, index, path_relative_to
|
from ostack_validator.common import Issue, index, path_relative_to
|
||||||
from ostack_validator.model import *
|
from ostack_validator.model import *
|
||||||
|
from ostack_validator.exceptions import ValidatorException
|
||||||
|
|
||||||
|
|
||||||
class SshShell(spur.SshShell):
|
class SshShell(spur.SshShell):
|
||||||
@ -38,7 +39,7 @@ class SshShell(spur.SshShell):
|
|||||||
try:
|
try:
|
||||||
self._pkey = DSSKey.from_private_key(StringIO(private_key))
|
self._pkey = DSSKey.from_private_key(StringIO(private_key))
|
||||||
except SSHException:
|
except SSHException:
|
||||||
raise "Unknown private key format"
|
raise ValidatorException("Unknown private key format")
|
||||||
|
|
||||||
self._sock = sock
|
self._sock = sock
|
||||||
|
|
||||||
|
2
ostack_validator/exceptions.py
Normal file
2
ostack_validator/exceptions.py
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
class ValidatorException(BaseException):
|
||||||
|
pass
|
Loading…
x
Reference in New Issue
Block a user