def do_run(self, args=None):
    if args:
        _args = framework.parse_args(args)
    else:
        _args = ' '
    if (not self.options.required_set()):
        self.allow_print.set()
        self.print_error('Required options not set')
        self.print_error("Check 'Required' column\n")
        self.show_options()
        self.allow_print.clear()
        return
    self.stopper.clear()
    self.allow_print.set()
    if (self.FORCE_THREAD or (_args[0].lower() in ('job', 'thread', 'j', 't'))):
        if self.FORCE_THREAD:
            self.print_output('Module must be run in background!')
        self.allow_print.clear()
        t = threads.ModuleThread(target=self, args=[self.stopper, self.allow_print, self.module_id, self.stdin_q])
        t.daemon = True
        self.thread_to_return = t
        return True
    else:
        try:
            self.run_module()
        except KeyboardInterrupt:
            pass
        finally:
            self.cleanup_exit()
def do_run(self, args=None):
    if args:
        _args = framework.parse_args(args)
    else:
        _args = ' '
    if (not self.options.required_set()):
        self.allow_print.set()
        self.print_error('Required options not set')
        self.print_error("Check 'Required' column\n")
        self.show_options()
        self.allow_print.clear()
        return
    self.stopper.clear()
    self.allow_print.set()
    if (self.FORCE_THREAD or (_args[0].lower() in ('job', 'thread', 'j', 't'))):
        if self.FORCE_THREAD:
            self.print_output('Module must be run in background!')
        self.allow_print.clear()
        t = threads.ModuleThread(target=self, args=[self.stopper, self.allow_print, self.module_id, self.stdin_q])
        t.daemon = True
        self.thread_to_return = t
        return True
    else:
        try:
            self.run_module()
        except KeyboardInterrupt:
            pass
        finally:
            self.cleanup_exit()