check bools explicitly

This commit is contained in:
k4yt3x 2022-04-02 05:29:54 +00:00
parent bcb2e97f89
commit ebbe4570d5
4 changed files with 5 additions and 5 deletions

View File

@ -114,7 +114,7 @@ class VideoDecoder(threading.Thread):
# continue running until an exception occurs # continue running until an exception occurs
# or all frames have been decoded # or all frames have been decoded
while self.running: while self.running is True:
# pause if pause flag is set # pause if pause flag is set
if self.pause.value is True: if self.pause.value is True:
@ -140,7 +140,7 @@ class VideoDecoder(threading.Thread):
# keep checking if the running flag is set to False # keep checking if the running flag is set to False
# while waiting to put the next image into the queue # while waiting to put the next image into the queue
while self.running: while self.running is True:
with contextlib.suppress(queue.Full): with contextlib.suppress(queue.Full):
self.processing_queue.put( self.processing_queue.put(
( (

View File

@ -57,7 +57,7 @@ class Interpolator(multiprocessing.Process):
f"Interpolator process <blue>{self.name}</blue> initiating" f"Interpolator process <blue>{self.name}</blue> initiating"
) )
processor_objects = {} processor_objects = {}
while self.running: while self.running is True:
try: try:
# pause if pause flag is set # pause if pause flag is set
if self.pause.value is True: if self.pause.value is True:

View File

@ -47,7 +47,7 @@ class PipePrinter(threading.Thread):
self.running = True self.running = True
# keep printing contents in the PIPE # keep printing contents in the PIPE
while self.running: while self.running is True:
time.sleep(0.5) time.sleep(0.5)
try: try:

View File

@ -75,7 +75,7 @@ class Upscaler(multiprocessing.Process):
f"Upscaler process <blue>{self.name}</blue> initiating" f"Upscaler process <blue>{self.name}</blue> initiating"
) )
processor_objects = {} processor_objects = {}
while self.running: while self.running is True:
try: try:
# pause if pause flag is set # pause if pause flag is set
if self.pause.value is True: if self.pause.value is True: