changeset 4580:b1716a8b32d3

extensions: fix load of module/__init__.py on OS X
author Brendan Cully <brendan@kublai.com>
date Wed, 13 Jun 2007 19:05:20 -0700
parents 78c50632437e
children 4500fbe3a432
files mercurial/extensions.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/extensions.py	Wed Jun 13 13:50:29 2007 -0700
+++ b/mercurial/extensions.py	Wed Jun 13 19:05:20 2007 -0700
@@ -31,7 +31,8 @@
         module_name = "hgext_%s" % name.replace('.', '_')
         if os.path.isdir(path):
             # module/__init__.py style
-            fd, fpath, desc = imp.find_module('', [path])
+            d, f = os.path.split(path)
+            fd, fpath, desc = imp.find_module(f, [d])
             mod = imp.load_module(module_name, fd, fpath, desc)
         else:
             mod = imp.load_source(module_name, path)