Skip to content

Commit

Permalink
clean up returnValue calls
Browse files Browse the repository at this point in the history
  • Loading branch information
djmitche committed May 5, 2012
1 parent 3333c0c commit 5cf2e8a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions master/buildbot/schedulers/forcesched.py
Expand Up @@ -267,6 +267,7 @@ def force(self, owner, builder_name, **kwargs):
# for all the builders
# we just do nothing on a builder that is not in our builderNames
defer.returnValue(None)
return

# Currently the validation code expects all kwargs to be lists
# I don't want to refactor that now so much sure we comply...
Expand Down
2 changes: 1 addition & 1 deletion master/docs/developer/style.rst
Expand Up @@ -139,7 +139,7 @@ The key points to notice here:
``return xval + y`` are invalid. Instead, yield the result of
``defer.returnValue``. Although this function does cause an immediate
function exit, for clarity it should be followed by a bare ``return``, as in
the example.
the example, unless it is the last statement in a function.

The great advantage of ``inlineCallbacks`` is that it allows you to use all
of the usual Pythonic control structures in their natural form. In particular,
Expand Down

0 comments on commit 5cf2e8a

Please sign in to comment.