changeset 7960:5c794e7331e7

extensions loading: don't fail if path to extension ends with a '/'
author Alexander Solovyov <piranha@piranha.org.ua>
date Wed, 01 Apr 2009 12:11:14 +0300
parents 5fb6edbf0ab8
children 52e442fe43f4
files mercurial/extensions.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/extensions.py	Sat Apr 04 15:14:36 2009 +0200
+++ b/mercurial/extensions.py	Wed Apr 01 12:11:14 2009 +0300
@@ -33,7 +33,7 @@
     path = os.path.expanduser(path)
     if os.path.isdir(path):
         # module/__init__.py style
-        d, f = os.path.split(path)
+        d, f = os.path.split(path.rstrip('/'))
         fd, fpath, desc = imp.find_module(f, [d])
         return imp.load_module(module_name, fd, fpath, desc)
     else: