def check(self): conn = TorCtl.connect() if conn != None: conn.close() return True return False
def stop(self): if not self.check(): return conn = TorCtl.connect() if conn != None: conn.send_signal("SHUTDOWN") conn.close()