Show More
@@ -31,7 +31,8 b' def load(ui, name, path):' | |||||
31 | module_name = "hgext_%s" % name.replace('.', '_') |
|
31 | module_name = "hgext_%s" % name.replace('.', '_') | |
32 | if os.path.isdir(path): |
|
32 | if os.path.isdir(path): | |
33 | # module/__init__.py style |
|
33 | # module/__init__.py style | |
34 | fd, fpath, desc = imp.find_module('', [path]) |
|
34 | d, f = os.path.split(path) | |
|
35 | fd, fpath, desc = imp.find_module(f, [d]) | |||
35 | mod = imp.load_module(module_name, fd, fpath, desc) |
|
36 | mod = imp.load_module(module_name, fd, fpath, desc) | |
36 | else: |
|
37 | else: | |
37 | mod = imp.load_source(module_name, path) |
|
38 | mod = imp.load_source(module_name, path) |
General Comments 0
You need to be logged in to leave comments.
Login now