# HG changeset patch # User Cédric Duval # Date 2009-06-21 15:18:48 # Node ID 08636e18268f7fab5320a66c3bb885016f7772cb # Parent e4e22a310b6297516f1e657a0d7c52240a0cdec0 extensions: check for path existence only when necessary diff --git a/mercurial/extensions.py b/mercurial/extensions.py --- a/mercurial/extensions.py +++ b/mercurial/extensions.py @@ -135,8 +135,10 @@ def disabled(): else: name = e path = os.path.join(extpath, e, '__init__.py') + if not os.path.exists(path): + continue - if name in exts or name == '__init__' or not os.path.exists(path): + if name in exts or name == '__init__': continue try: