def start(self): if not FAKE_START_FAILURE: self.idle_add(self.wrapped_object.start) if FAKE_EXIT>0: def process_exit(): self.cleanup() self.timeout_add(250, self.stop) self.timeout_add(FAKE_EXIT*1000, process_exit) if FAKE_CRASH>0: def force_exit(): sys.exit(1) self.timeout_add(FAKE_CRASH*1000, force_exit) subprocess_callee.start(self)
def start(self): if not FAKE_START_FAILURE: self.idle_add(self.wrapped_object.start) if FAKE_EXIT>0: def process_exit(): self.cleanup() self.timeout_add(250, self.stop) self.timeout_add(FAKE_EXIT*1000, process_exit) if FAKE_CRASH>0: def force_exit(): sys.exit(1) self.timeout_add(FAKE_CRASH*1000, force_exit) subprocess_callee.start(self)