Beispiel #1
0
 def tearDownClass(cls):
     super(UnmanagedTorTest, cls).tearDownClass()
     try:
         for datadir in DATA_DIRS.itervalues():
             pidfile = join(datadir, "pid")
             if exists(pidfile):
                 pid = int(fu.read_file(pidfile))
                 fu.terminate_process(pid)
                 log.debug("TEST: killed Tor {}.".format(basename(datadir)))
                 fu.removedir(datadir)
     except Exception as exc:
         log.exception("Exception raised tearing down class {}: {}".format(
             cls.__name__, exc))
Beispiel #2
0
 def terminate_process_and_log(self, pid, msg=None):
     fu.terminate_process(pid)
     if msg:
         log.debug(msg)