buildbot / buildbot

@@ -313,7 +313,7 @@
Loading
313 313
        results = stdout.decode(self.encoding)
314 314
315 315
        revNodeList = [rn.split(':', 1) for rn in results.strip().split()]
316 -
        defer.returnValue(revNodeList)
316 +
        return revNodeList
317 317
318 318
    @defer.inlineCallbacks
319 319
    def _processBranchChanges(self, new_rev, branch):

@@ -183,7 +183,7 @@
Loading
183 183
                    "gerrit: duplicate change event {} by {}"
184 184
                    .format(eventstr, self.__class__.__name__))
185 185
                log.msg(message.encode("utf-8"))
186 -
            defer.returnValue(None)
186 +
            return None
187 187
188 188
        if self.debug:
189 189
            eventstr = "{} -- {}:{}".format(
@@ -209,12 +209,12 @@
Loading
209 209
        if "change" not in event:
210 210
            if self.debug:
211 211
                log.msg("unsupported event {}".format(event["type"]))
212 -
            return defer.returnValue(None)
212 +
            return None
213 213
214 214
        if "patchSet" not in event:
215 215
            if self.debug:
216 216
                log.msg("unsupported event {}".format(event["type"]))
217 -
            return defer.returnValue(None)
217 +
            return None
218 218
219 219
        event = _canonicalize_event(event)
220 220
        event_change = event["change"]

@@ -118,7 +118,7 @@
Loading
118 118
            known_hosts_path = os.path.join(temp_dir_path, 'ssh-known-hosts')
119 119
            misc.writeLocalFile(known_hosts_path, ssh_host_key_data)
120 120
121 -
        defer.returnValue((key_path, known_hosts_path))
121 +
        return (key_path, known_hosts_path)
122 122
123 123
    @defer.inlineCallbacks
124 124
    def perform(self, manager):
@@ -132,7 +132,7 @@
Loading
132 132
                ret = yield self._performImpl(manager, key_path, hosts_path)
133 133
        else:
134 134
            ret = yield self._performImpl(manager, None, None)
135 -
        defer.returnValue(ret)
135 +
        return ret
136 136
137 137
138 138
@implementer(IMachineAction)

@@ -227,7 +227,7 @@
Loading
227 227
        res = yield threads.deferToThread(self._thd_start_instance, image,
228 228
                                          dockerfile, volumes, custom_context,
229 229
                                          encoding, buildargs, hostname)
230 -
        defer.returnValue(res)
230 +
        return res
231 231
232 232
    def _image_exists(self, client, name):
233 233
        # Make sure the image exists

@@ -110,7 +110,7 @@
Loading
110 110
            yield self._kube.createPod(self.namespace, pod_spec)
111 111
        except kubeclientservice.KubeError as e:
112 112
            raise LatentWorkerFailedToSubstantiate(str(e)) from e
113 -
        defer.returnValue(True)
113 +
        return True
114 114
115 115
    @defer.inlineCallbacks
116 116
    def stop_instance(self, fast=False, reportFailure=True):

@@ -92,13 +92,13 @@
Loading
92 92
            basicAuth = yield self.renderSecrets(self.basicAuth)
93 93
            authstring = "{user}:{password}".format(**basicAuth).encode('utf-8')
94 94
            encoded = base64.b64encode(authstring)
95 -
            return defer.returnValue("Basic {0}".format(encoded))
95 +
            return "Basic {0}".format(encoded)
96 96
97 97
        if self.bearerToken is not None:
98 98
            bearerToken = yield self.renderSecrets(self.bearerToken)
99 -
            return defer.returnValue("Bearer {0}".format(bearerToken))
99 +
            return "Bearer {0}".format(bearerToken)
100 100
101 -
        return defer.returnValue(None)
101 +
        return None
102 102
103 103
    def getConfig(self):
104 104
        return self.config
@@ -232,7 +232,7 @@
Loading
232 232
            if arg in config:
233 233
                req_kwargs[arg] = config[arg]
234 234
235 -
        return defer.returnValue((url, req_kwargs))
235 +
        return (url, req_kwargs)
236 236
237 237
    @defer.inlineCallbacks
238 238
    def createPod(self, namespace, spec):
@@ -241,7 +241,7 @@
Loading
241 241
        res_json = yield res.json()
242 242
        if res.code not in (200, 201, 202):
243 243
            raise KubeError(res_json)
244 -
        defer.returnValue(res_json)
244 +
        return res_json
245 245
246 246
    @defer.inlineCallbacks
247 247
    def deletePod(self, namespace, name, graceperiod=0):
@@ -251,7 +251,7 @@
Loading
251 251
        res_json = yield res.json()
252 252
        if res.code != 200:
253 253
            raise KubeError(res_json)
254 -
        defer.returnValue(res_json)
254 +
        return res_json
255 255
256 256
    @defer.inlineCallbacks
257 257
    def waitForPodDeletion(self, namespace, name, timeout):
@@ -270,7 +270,7 @@
Loading
270 270
            if res.code != 200:
271 271
                raise KubeError(res_json)
272 272
            yield asyncSleep(1)
273 -
        defer.returnValue(res_json)
273 +
        return res_json
274 274
275 275
    @property
276 276
    def namespace(self):

@@ -38,7 +38,7 @@
Loading
38 38
    def renderWorkerPropsOnStart(self, build):
39 39
        props = yield self.renderWorkerProps(build)
40 40
        self._actual_build_props = copy.deepcopy(props)
41 -
        defer.returnValue(props)
41 +
        return props
42 42
43 43
    def resetWorkerPropsOnStop(self):
44 44
        self._actual_build_props = None
@@ -46,8 +46,8 @@
Loading
46 46
    @defer.inlineCallbacks
47 47
    def isCompatibleWithBuild(self, build):
48 48
        if self._actual_build_props is None:
49 -
            defer.returnValue(True)
49 +
            return True
50 50
51 51
        requested_props = yield self.renderWorkerProps(build)
52 52
53 -
        defer.returnValue(requested_props == self._actual_build_props)
53 +
        return requested_props == self._actual_build_props
Files Coverage
master/buildbot 92.32%
worker/buildbot_worker 85.64%
Project Totals (333 files) 91.91%
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading