Skip to content

Commit

Permalink
Cosmetic changes in docstring and comments to StagedTaskCollection.
Browse files Browse the repository at this point in the history
  • Loading branch information
riccardomurri committed Nov 22, 2016
1 parent 4aa94cf commit f3c7449
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gc3libs/workflow.py
Expand Up @@ -677,7 +677,7 @@ class StagedTaskCollection(SequentialTaskCollection):
The sequence stops at the first N such that `stageN` is not defined.
The exit status of the whole sequence is the exit status of the
last `Task` instance run. However, if any of the `stageX` methods
last `Task` instance run. However, if any of the `stageN` methods
returns an integer value instead of a `Task` instance, then the
sequence stops and that number is used as the sequence exit
code.
Expand All @@ -692,16 +692,16 @@ def __init__(self, **extra_args):
SequentialTaskCollection.__init__(
self, [first_stage], **extra_args)
elif isinstance(first_stage, (int, long, tuple)):
# init parent class with no tasks, an dimmediately set the
# exitcode
# init parent class with no tasks,
# and immediately set the exitcode
SequentialTaskCollection.__init__(self, [], **extra_args)
self.execution.returncode = first_stage
self.execution.state = Run.State.TERMINATED
else:
raise AssertionError(
"Invalid return value from method `stage0()` of"
" `StagedTaskCollection` object %r:"
" must return `Task` instance or number" % self)
" must return `Task` instance or integer exit code" % self)
except AttributeError as ex:
raise AssertionError(
"Invalid `StagedTaskCollection` instance %r: %s"
Expand Down

0 comments on commit f3c7449

Please sign in to comment.