From 410e2b56f90a01684c215b1c67cd2979afb33a2f Mon Sep 17 00:00:00 2001 From: geens Date: Sat, 16 Nov 2024 21:57:15 +0100 Subject: [PATCH] Fix timeout printing --- sia/repeat_entry.py | 4 ++-- sia/single_entry.py | 4 ++-- todo.txt | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 todo.txt diff --git a/sia/repeat_entry.py b/sia/repeat_entry.py index 92d705e..f8f9fdb 100644 --- a/sia/repeat_entry.py +++ b/sia/repeat_entry.py @@ -42,7 +42,7 @@ class RepeatEntry(Entry): """ super().__init__(id, timestamp) self._script = script - self._timeout = timeout or self.default_timeout + self._timeout = timeout self._limit = limit or self.default_limit self._stdout = "" self._stderr = "" @@ -77,7 +77,7 @@ class RepeatEntry(Entry): try: process = subprocess.run( self._script, - timeout=self._timeout, + timeout=(self._timeout or self.default_timeout), shell=True, capture_output=True, text=True diff --git a/sia/single_entry.py b/sia/single_entry.py index 7540b0b..3cfca5b 100644 --- a/sia/single_entry.py +++ b/sia/single_entry.py @@ -42,7 +42,7 @@ class SingleEntry(Entry): """ super().__init__(id, timestamp) self._script = script - self._timeout = timeout or self.default_timeout + self._timeout = timeout self._limit = limit self._stdout = "" self._stderr = "" @@ -81,7 +81,7 @@ class SingleEntry(Entry): try: process = subprocess.run( self._script, - timeout=self._timeout, + timeout=(self._timeout or self.default_timeout), shell=True, capture_output=True, text=True diff --git a/todo.txt b/todo.txt new file mode 100644 index 0000000..a249be8 --- /dev/null +++ b/todo.txt @@ -0,0 +1,2 @@ +flag for auto tab switch +flag for auto scroll \ No newline at end of file