##// END OF EJS Templates
extensions: use normpath to allow trailing '\' on Windows (issue4187)...
Ed Morley -
r20645:7d83c3b6 default
parent child Browse files
Show More
@@ -43,10 +43,10 b' def find(name):'
43
43
44 def loadpath(path, module_name):
44 def loadpath(path, module_name):
45 module_name = module_name.replace('.', '_')
45 module_name = module_name.replace('.', '_')
46 path = util.expandpath(path)
46 path = util.normpath(util.expandpath(path))
47 if os.path.isdir(path):
47 if os.path.isdir(path):
48 # module/__init__.py style
48 # module/__init__.py style
49 d, f = os.path.split(path.rstrip('/'))
49 d, f = os.path.split(path)
50 fd, fpath, desc = imp.find_module(f, [d])
50 fd, fpath, desc = imp.find_module(f, [d])
51 return imp.load_module(module_name, fd, fpath, desc)
51 return imp.load_module(module_name, fd, fpath, desc)
52 else:
52 else:
General Comments 0
You need to be logged in to leave comments. Login now