# Path: sshproxy/config.py
# class ConfigSection(object):
# class Config(object):
# class SSHproxyConfigSection(ConfigSection):
#     def __init__(self, config, section):
#     def init_section(self):
#     def get_default(self, option, default=None):
#     def __getitem__(self, option):
#     def __setitem__(self, option, value):
#     def __delitem__(self, option):
#     def keys(self):
#     def has_key(self, option):
#     def get(self, option, default=None, raw=False):
#     def set(self, option, value):
#     def pop(self, option):
#     def items(self):
#     def write(self):
#     def __str__(self):
#     def register(cls, force=False):
#     def register_handler(cls, name, handler, force=False):
#     def get_handler(cls, name):
#     def __init__(self, inifile):
#     def check_mode(self):
#     def __call__(self, section=None):
#     def __getitem__(self, section):
#     def __setitem__(self, section, options):
#     def __delitem__(self, section):
#     def pop(self, section):
#     def keys(self):
#     def has_key(self, section):
#     def defaults(self):
#     def touch(self):
#     def write(self, inifile=None):
#     def __str__(self):
# def path(path):
# 
# Path: sshproxy/util.py
# def istrue(s):
#     if not s:
#         return False
#     istrue = False
#     if s.lower().strip() in ('yes', 'true', 'on', '1'):
#         istrue = True
#     else:
#         try:
#             if int(s) != 0:
#                 istrue = True
#         except ValueError:
#             pass
#     return istrue
# 
# Path: sshproxy/log.py
# def exception(*args):
# 
# Path: sshproxy/registry.py
# def get_class(class_id):
#     return Registry._registry.get(class_id, Dummy)


import smtplib
import types
import socket, os
from sshproxy.config import get_config, ConfigSection
from sshproxy.util import istrue
from sshproxy import log
from sshproxy.registry import get_class
        from datetime import datetime
                    break
                
                self.g_site = argv[0].split(":", 1)[0]
            elif self.args[0][0] != '-':
                
                if len(self.args) > 1:
                    self.g_conn_type = "remote_exec"
                else:
                    self.g_conn_type = "shell"
                self.g_site = self.args[0]
            else:
                self.g_site = "proxy_command"
        return self.g_site
    
    def report_failure(self, reason, *args, **kwargs):
        """Reporting error
        
        @param reason: reason of failure"""

        cfg = get_config('email_notifier')

        tpldict = {}
        
        tpldict['reason'] = reason
        if len(args) > 0:
            tpldict['msg'] = args[0]
        else:
            tpldict['msg'] = "No additional message."
        
        

# Path: sshproxy/config.py
# class ConfigSection(object):
# class Config(object):
# class SSHproxyConfigSection(ConfigSection):
#     def __init__(self, config, section):
#     def init_section(self):
#     def get_default(self, option, default=None):
#     def __getitem__(self, option):
#     def __setitem__(self, option, value):
#     def __delitem__(self, option):
#     def keys(self):
#     def has_key(self, option):
#     def get(self, option, default=None, raw=False):
#     def set(self, option, value):
#     def pop(self, option):
#     def items(self):
#     def write(self):
#     def __str__(self):
#     def register(cls, force=False):
#     def register_handler(cls, name, handler, force=False):
#     def get_handler(cls, name):
#     def __init__(self, inifile):
#     def check_mode(self):
#     def __call__(self, section=None):
#     def __getitem__(self, section):
#     def __setitem__(self, section, options):
#     def __delitem__(self, section):
#     def pop(self, section):
#     def keys(self):
#     def has_key(self, section):
#     def defaults(self):
#     def touch(self):
#     def write(self, inifile=None):
#     def __str__(self):
# def path(path):
# 
# Path: sshproxy/util.py
# def istrue(s):
#     if not s:
#         return False
#     istrue = False
#     if s.lower().strip() in ('yes', 'true', 'on', '1'):
#         istrue = True
#     else:
#         try:
#             if int(s) != 0:
#                 istrue = True
#         except ValueError:
#             pass
#     return istrue
# 
# Path: sshproxy/log.py
# def exception(*args):
# 
# Path: sshproxy/registry.py
# def get_class(class_id):
#     return Registry._registry.get(class_id, Dummy)


# Path: lib/email_notifier/notifier.py
import smtplib
import types
import socket, os
from sshproxy.config import get_config, ConfigSection
from sshproxy.util import istrue
from sshproxy import log
from sshproxy.registry import get_class
        from datetime import datetime

                    break
                
                self.g_site = argv[0].split(":", 1)[0]
            elif self.args[0][0] != '-':
                
                if len(self.args) > 1:
                    self.g_conn_type = "remote_exec"
                else:
                    self.g_conn_type = "shell"
                self.g_site = self.args[0]
            else:
                self.g_site = "proxy_command"
        return self.g_site
    
    def report_failure(self, reason, *args, **kwargs):
        """Reporting error
        
        @param reason: reason of failure"""

        cfg = get_config('email_notifier')

        tpldict = {}
        
        tpldict['reason'] = reason
        if len(args) > 0:
            tpldict['msg'] = args[0]
        else:
            tpldict['msg'] = "No additional message."
        
        

        tpldict['client'] = self.username