Ticket #300: 26compat.diff

File 26compat.diff, 0.7 KB (added by chrism, 4 years ago)

Patch for Py2.6 compatibility

  • copydir.py

     
    421421class LaxTemplate(string.Template): 
    422422    # This change of pattern allows for anything in braces, but 
    423423    # only identifiers outside of braces: 
    424     pattern = re.compile(r""" 
     424    pattern = """ 
    425425    \$(?: 
    426426      (?P<escaped>\$)             |   # Escape sequence of two delimiters 
    427427      (?P<named>[_a-z][_a-z0-9]*) |   # delimiter and a Python identifier 
    428428      {(?P<braced>.*?)}           |   # delimiter and a braced identifier 
    429429      (?P<invalid>)                   # Other ill-formed delimiter exprs 
    430430    ) 
    431     """, re.VERBOSE | re.IGNORECASE) 
     431    """