Skip to content

Commit 09dd3a9

Browse files
committed
CallSequence: add copy() method.
1 parent 0fd5e80 commit 09dd3a9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pyocd/utility/sequencer.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,12 @@ def clear(self):
8585
"""! @brief Remove all tasks from the sequence."""
8686
self._calls = OrderedDict()
8787

88+
def copy(self):
89+
"""! @brief Duplicate the sequence."""
90+
new_seq = CallSequence()
91+
new_seq._calls = self._calls.copy()
92+
return new_seq
93+
8894
def remove_task(self, name):
8995
"""! @brief Remove a task with the given name.
9096
@exception KeyError Raised if no task with the specified name exists.

0 commit comments

Comments
 (0)