equal
deleted
inserted
replaced
40 # module/__init__.py style |
40 # module/__init__.py style |
41 d, f = os.path.split(path.rstrip('/')) |
41 d, f = os.path.split(path.rstrip('/')) |
42 fd, fpath, desc = imp.find_module(f, [d]) |
42 fd, fpath, desc = imp.find_module(f, [d]) |
43 return imp.load_module(module_name, fd, fpath, desc) |
43 return imp.load_module(module_name, fd, fpath, desc) |
44 else: |
44 else: |
45 return imp.load_source(module_name, path) |
45 try: |
|
46 return imp.load_source(module_name, path) |
|
47 except IOError, exc: |
|
48 if not exc.filename: |
|
49 exc.filename = path # python does not fill this |
|
50 raise |
46 |
51 |
47 def load(ui, name, path): |
52 def load(ui, name, path): |
48 # unused ui argument kept for backwards compatibility |
53 # unused ui argument kept for backwards compatibility |
49 if name.startswith('hgext.') or name.startswith('hgext/'): |
54 if name.startswith('hgext.') or name.startswith('hgext/'): |
50 shortname = name[6:] |
55 shortname = name[6:] |