summaryrefslogtreecommitdiff
path: root/src/buildstream/_stream.py
diff options
context:
space:
mode:
authorJames Ennis <james.ennis@codethink.co.uk>2019-09-06 10:56:40 +0100
committerJames Ennis <james.ennis@codethink.co.uk>2019-09-06 11:29:06 +0100
commitd69f2324e6978b41106ae4bc63e75339e4f3f98f (patch)
tree291e263ae58e10b53c2146d31b58d2cf06b2909e /src/buildstream/_stream.py
parent04c0d417c26629df34b846363c7e18ab34d98981 (diff)
downloadbuildstream-d69f2324e6978b41106ae4bc63e75339e4f3f98f.tar.gz
Address no-else-raise pylint warning
In the latest released version of pylint (2.3.x), the "no-else-raise" (R1720) warning has been introduced. See: http://pylint.pycqa.org/en/latest/whatsnew/changelog.html#what-s-new-in-pylint-2-3-0 There are many instances of this in our codebase, which this patch addresses.
Diffstat (limited to 'src/buildstream/_stream.py')
-rw-r--r--src/buildstream/_stream.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/buildstream/_stream.py b/src/buildstream/_stream.py
index b3e0a6183..2e43bb1a2 100644
--- a/src/buildstream/_stream.py
+++ b/src/buildstream/_stream.py
@@ -217,8 +217,8 @@ class Stream():
message = "Buildtree is not cached locally or in available remotes"
if usebuildtree == "always":
raise StreamError(message)
- else:
- self._message(MessageType.INFO, message + ", shell will be loaded without it")
+
+ self._message(MessageType.INFO, message + ", shell will be loaded without it")
else:
buildtree = True
@@ -481,9 +481,9 @@ class Stream():
msg = "{} is not cached".format(element.name)
if self._context.sched_error_action != _SchedulerErrorAction.CONTINUE:
raise StreamError("Push failed: " + msg)
- else:
- self._message(MessageType.WARN, msg)
- uncached_elements.append(element)
+
+ self._message(MessageType.WARN, msg)
+ uncached_elements.append(element)
if cached_elements:
self._scheduler.clear_queues()
@@ -1356,7 +1356,7 @@ class Stream():
if status == SchedStatus.ERROR:
raise StreamError()
- elif status == SchedStatus.TERMINATED:
+ if status == SchedStatus.TERMINATED:
raise StreamError(terminated=True)
# _fetch()