Project

General

Profile

« Previous | Next » 

Revision 1424

xml_func.py: _replace: Fixed bug where value entry was not unpacked

View differences:

lib/xml_func.py
3 3
import datetime
4 4
import re
5 5
import sre_constants
6
import sys
7 6

  
8 7
import dates
9 8
import exc
......
137 136

  
138 137
def _replace(items):
139 138
    items = conv_items(str, items) # get *once* from iter and check types
140
    try: value = items.pop() # value is last entry
139
    try: value = items.pop()[1] # last entry contains value
141 140
    except IndexError, e: raise SyntaxException(e)
142 141
    try:
143 142
        for repl, with_ in items:

Also available in: Unified diff