summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2018-12-16 18:23:30 +0900
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2018-12-26 14:54:05 -0500
commit425781db65d183e8f069a217984352cb22f6cb34 (patch)
tree26c0de4b4cba8c83b05b479c68bfb202edddae93
parentcaf4966977c4415619a55364213c352d04e25b87 (diff)
downloadbuildstream-425781db65d183e8f069a217984352cb22f6cb34.tar.gz
_signals.py: Fixing new (simplifiable-if-expression) linter errors
-rw-r--r--buildstream/_signals.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/buildstream/_signals.py b/buildstream/_signals.py
index 0035485a5..56f70fa7a 100644
--- a/buildstream/_signals.py
+++ b/buildstream/_signals.py
@@ -77,7 +77,7 @@ def terminator(terminate_func):
yield
return
- outermost = False if terminator_stack else True
+ outermost = bool(not terminator_stack)
terminator_stack.append(terminate_func)
if outermost:
@@ -137,7 +137,7 @@ def suspend_handler(sig, frame):
def suspendable(suspend_callback, resume_callback):
global suspendable_stack # pylint: disable=global-statement
- outermost = False if suspendable_stack else True
+ outermost = bool(not suspendable_stack)
suspender = Suspender(suspend_callback, resume_callback)
suspendable_stack.append(suspender)