Show More
@@ -427,7 +427,7 b' b2partsgenorder = []' | |||||
427 | # This exists to help extensions wrap steps if necessary |
|
427 | # This exists to help extensions wrap steps if necessary | |
428 | b2partsgenmapping = {} |
|
428 | b2partsgenmapping = {} | |
429 |
|
429 | |||
430 | def b2partsgenerator(stepname): |
|
430 | def b2partsgenerator(stepname, idx=None): | |
431 | """decorator for function generating bundle2 part |
|
431 | """decorator for function generating bundle2 part | |
432 |
|
432 | |||
433 | The function is added to the step -> function mapping and appended to the |
|
433 | The function is added to the step -> function mapping and appended to the | |
@@ -439,7 +439,10 b' def b2partsgenerator(stepname):' | |||||
439 | def dec(func): |
|
439 | def dec(func): | |
440 | assert stepname not in b2partsgenmapping |
|
440 | assert stepname not in b2partsgenmapping | |
441 | b2partsgenmapping[stepname] = func |
|
441 | b2partsgenmapping[stepname] = func | |
442 | b2partsgenorder.append(stepname) |
|
442 | if idx is None: | |
|
443 | b2partsgenorder.append(stepname) | |||
|
444 | else: | |||
|
445 | b2partsgenorder.insert(idx, stepname) | |||
443 | return func |
|
446 | return func | |
444 | return dec |
|
447 | return dec | |
445 |
|
448 |
General Comments 0
You need to be logged in to leave comments.
Login now