Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #2465: tg.util.patch

File tg.util.patch, 421 bytes (added by Tomoyuki Kano, 2 years ago)
  • tg/util.py

    a b  
    6464    """ 
    6565 
    6666    match = prefix + "." 
     67    n = len(match) 
    6768 
    68     new_dict = Bunch([(key.lstrip(match), dictionary[key]) 
     69    new_dict = Bunch([(key[n:], dictionary[key]) 
    6970                       for key in dictionary.iterkeys() 
    7071                       if key.startswith(match)]) 
    7172    if new_dict: