# HG changeset patch # User Cédric Duval # Date 1245597528 -7200 # Node ID 08636e18268f7fab5320a66c3bb885016f7772cb # Parent e4e22a310b6297516f1e657a0d7c52240a0cdec0 extensions: check for path existence only when necessary diff -r e4e22a310b62 -r 08636e18268f mercurial/extensions.py --- a/mercurial/extensions.py Sun Jun 21 17:35:04 2009 +0200 +++ b/mercurial/extensions.py Sun Jun 21 17:18:48 2009 +0200 @@ -135,8 +135,10 @@ 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: