mercurial/templater.py
changeset 8366 0bf0045000b5
parent 8361 d8c5a7f25a40
child 8474 bccc90b56d02
equal deleted inserted replaced
8365:94e91205d9b6 8366:0bf0045000b5
    87 
    87 
    88             if key in map:
    88             if key in map:
    89                 v = map[key]
    89                 v = map[key]
    90             else:
    90             else:
    91                 v = self.defaults.get(key, "")
    91                 v = self.defaults.get(key, "")
    92             if callable(v):
    92             if hasattr(v, '__call__'):
    93                 v = v(**map)
    93                 v = v(**map)
    94             if format:
    94             if format:
    95                 if not hasattr(v, '__iter__'):
    95                 if not hasattr(v, '__iter__'):
    96                     raise SyntaxError(_("Error expanding '%s%%%s'")
    96                     raise SyntaxError(_("Error expanding '%s%%%s'")
    97                                       % (key, format))
    97                                       % (key, format))