def click_event(self, event):
<EOL>self.prevent_refresh = False<EOL>try:<EOL><INDENT>if self.error_messages:<EOL><INDENT>button = event["<STR_LIT>"]<EOL>if button == <NUM_LIT:1>:<EOL><INDENT>self.error_index = (self.error_index + <NUM_LIT:1>) % len(self.error_messages)<EOL>error = self.error_messages[self.error_index]<EOL>self.error_output(error)<EOL><DEDENT>if button == <NUM_LIT:3>:<EOL><INDENT>self.hide_errors()<EOL><DEDENT>if button != <NUM_LIT:2> or (self.terminated or self.disabled):<EOL><INDENT>self.prevent_refresh = True<EOL><DEDENT><DEDENT>elif self.click_events:<EOL><INDENT>click_method = getattr(self.module_class, "<STR_LIT>")<EOL>if self.click_events == self.PARAMS_NEW:<EOL><INDENT>click_method(event)<EOL><DEDENT>else:<EOL><INDENT>click_method(<EOL>self.i3status_thread.json_list,<EOL>self.config["<STR_LIT>"]["<STR_LIT>"],<EOL>event,<EOL>)<EOL><DEDENT>self.set_updated()<EOL><DEDENT>else:<EOL><INDENT>self.prevent_refresh = True<EOL><DEDENT><DEDENT>except Exception:<EOL><INDENT>msg = "<STR_LIT>".format(self.module_full_name)<EOL>self._py3_wrapper.report_exception(msg)<EOL><DEDENT>
Execute the 'on_click' method of this module with the given event.