equal
deleted
inserted
replaced
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 ' |