Esempio n. 1
0
def main(args):
    logger = log.getdebuglogger("detector")

    args_obj = parse_args(args)
    # print "'{}'".format(int(args_obj.threshold))

    args_obj.func(args_obj, logger)
Esempio n. 2
0
 def __init__(self,
              host,
              root,
              pwd,
              session_folder,
              xdebug_folder,
              db_host,
              db_user,
              db_pwd,
              db_name,
              logger=None):
     self.db_host = db_host
     self.db_user = db_user
     self.db_pwd = db_pwd
     self.db_name = db_name
     self.xdebug_folder = xdebug_folder
     self.session_folder_path = session_folder
     self.host = host
     self.root = root
     self.pwd = pwd
     if logger:
         self.logger = logger
     else:
         self.logger = log.getdebuglogger("mosgi")
     with ssh_interface.create_ssh_client(self.host, self.root,
                                          self.pwd) as client:
         for file in ssh_interface.get_folder_content_files(
                 client, xdebug_folder):
             self.logger.info("residual xdebug file found {}".format(file))
             ssh_interface.delete_file(client, file)
             self.logger.info("residual xdebug file deleted")
     self.logger.info("mosgi initialisation finished successfully")
Esempio n. 3
0
def main(args):
    logger = log.getdebuglogger("racoon")
    pargs = parse_args(args)
    logger.info("config: {}".format(pargs))
    if pargs.verbose:
        logger.setLevel(log.LEVELS[2])
    else:
        logger.setLevel(log.LEVELS[0])
    pargs.func(pargs, logger)
Esempio n. 4
0
import threading
import subprocess
import os
import signal
import time
import log

import selenese

# Install logger
s_logger = log.getdebuglogger("selrun")

# Handler Class


class SeleneseRunnerHandler:

    def handle_command(self, i, cmd, tc_fname):
        pass


# Decorator
def threaded(fn):
    def wrapper(*args, **kwargs):
        thr = threading.Thread(target=fn, args=args, kwargs=kwargs)
        thr.start()
        return thr
    return wrapper


def _parse_selenese_fname(test_fname):