Commit 2b5a4e76 authored by Sebastien Robin's avatar Sebastien Robin

allows to add comments inside sequence strings, works only when

steps are separated with new lines

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28003 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 8c4f4558
...@@ -35,6 +35,7 @@ import random ...@@ -35,6 +35,7 @@ import random
import traceback import traceback
import linecache import linecache
import sys import sys
import re
# Monkey patch traceback system to print how far we get in the current # Monkey patch traceback system to print how far we get in the current
# sequence. # sequence.
# This part is adapted from python 2.4's traceback.py # This part is adapted from python 2.4's traceback.py
...@@ -142,6 +143,8 @@ class SequenceList: ...@@ -142,6 +143,8 @@ class SequenceList:
returns the sequence for those steps. returns the sequence for those steps.
""" """
# remove comments in sequence strings
sequence_string = re.subn("#.*\n", "\n", sequence_string)[0]
step_list = sequence_string.split() step_list = sequence_string.split()
return self.addSequenceStringList(step_list) return self.addSequenceStringList(step_list)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment