mercurial/hook.py
changeset 7280 810ca383da9c
parent 6762 f67d1468ac50
child 7416 196b05a548d0
equal deleted inserted replaced
7279:1f0f84660dea 7280:810ca383da9c
    37                                    '(import of "%s" failed)') %
    37                                    '(import of "%s" failed)') %
    38                                  (hname, modname))
    38                                  (hname, modname))
    39         try:
    39         try:
    40             for p in funcname.split('.')[1:]:
    40             for p in funcname.split('.')[1:]:
    41                 obj = getattr(obj, p)
    41                 obj = getattr(obj, p)
    42         except AttributeError, err:
    42         except AttributeError:
    43             raise util.Abort(_('%s hook is invalid '
    43             raise util.Abort(_('%s hook is invalid '
    44                                '("%s" is not defined)') %
    44                                '("%s" is not defined)') %
    45                              (hname, funcname))
    45                              (hname, funcname))
    46         if not callable(obj):
    46         if not callable(obj):
    47             raise util.Abort(_('%s hook is invalid '
    47             raise util.Abort(_('%s hook is invalid '