Skip to content

Commit

Permalink
fix timer
Browse files Browse the repository at this point in the history
  • Loading branch information
phoenixthrush committed Nov 17, 2024
1 parent 55766cf commit 78677e3
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/aniworld/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,6 @@ class CustomTheme(npyscreen.ThemeManager):


class EpisodeForm(npyscreen.ActionForm):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.timer = None
self.setup_signal_handling()

def create(self):
logging.debug("Creating EpisodeForm")

Expand Down Expand Up @@ -223,7 +218,10 @@ def signal_handler():
logging.debug("Signal handler for SIGINT registered")

def start_timer(self):
self.timer = threading.Timer(random.randint(600, 900), self.delayed_message_box)
self.timer = threading.Timer( # pylint: disable=attribute-defined-outside-init
random.randint(600, 900),
self.delayed_message_box
)
self.timer.start()

def cancel_timer(self):
Expand Down

0 comments on commit 78677e3

Please sign in to comment.