Browse Source

add exceptions

master
Brett Langdon 12 years ago
parent
commit
46ba8a102a
3 changed files with 19 additions and 0 deletions
  1. +16
    -0
      employ/exceptions.py
  2. +2
    -0
      employ/managers/__init__.py
  3. +1
    -0
      employ/managers/ec2.py

+ 16
- 0
employ/exceptions.py View File

@ -0,0 +1,16 @@
class EmployError(Exception):
"""
Base Employ Exception
"""
class ExecutionError(EmployError):
"""
Error when executing a command
"""
class SSHConnectionError(EmployError):
"""
Could not connect to EC2 Instance with SSH
"""

+ 2
- 0
employ/managers/__init__.py View File

@ -1,6 +1,8 @@
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
from employ.execptions import ExecutionError
class Manager(object):
name = "manager"


+ 1
- 0
employ/managers/ec2.py View File

@ -3,6 +3,7 @@ import time
import boto.ec2
from boto.manage.cmdshell import sshclient_from_instance
from employ.exceptions import SSHConnectionError
from employ.managers import Manager


Loading…
Cancel
Save