# 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):


import os
import MySQLdb
from sshproxy.config import get_config
        return result

    def sql_list(self, query):
        sql = self.db.cursor()
        sql.execute(query)
        for result in sql.fetchall():
            yield result
        sql.close()
        return

    def sql_add(self, query):
        sql = self.db.cursor()
        sql.execute(query)
        sql.close()
        result = self.sql_get('select last_insert_id()')
        return result

    def sql_update(self, query):
        sql = self.db.cursor()
        sql.execute(query)
        sql.close()

    # same content
    sql_del = sql_update

    def sql_set(self, table, **fields):
        query = """replace %s set %s"""
        q = []
        for field, value in fields.items():
            q.append("%s='%s'" % (field, Q(value)))

# 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: lib/mysql_db/mysql.py
import os
import MySQLdb
from sshproxy.config import get_config

        return result

    def sql_list(self, query):
        sql = self.db.cursor()
        sql.execute(query)
        for result in sql.fetchall():
            yield result
        sql.close()
        return

    def sql_add(self, query):
        sql = self.db.cursor()
        sql.execute(query)
        sql.close()
        result = self.sql_get('select last_insert_id()')
        return result

    def sql_update(self, query):
        sql = self.db.cursor()
        sql.execute(query)
        sql.close()

    # same content
    sql_del = sql_update

    def sql_set(self, table, **fields):
        query = """replace %s set %s"""
        q = []
        for field, value in fields.items():
            q.append("%s='%s'" % (field, Q(value)))

        sql = self.db.cursor()