Mercurial > public > mercurial-scm > hg
comparison mercurial/extensions.py @ 8877:08636e18268f
extensions: check for path existence only when necessary
author | C?dric Duval <cedricduval@free.fr> |
---|---|
date | Sun, 21 Jun 2009 17:18:48 +0200 |
parents | e4e22a310b62 |
children | 231f9d92fd7a |
comparison
equal
deleted
inserted
replaced
8876:e4e22a310b62 | 8877:08636e18268f |
---|---|
133 name = e.rsplit('.', 1)[0] | 133 name = e.rsplit('.', 1)[0] |
134 path = os.path.join(extpath, e) | 134 path = os.path.join(extpath, e) |
135 else: | 135 else: |
136 name = e | 136 name = e |
137 path = os.path.join(extpath, e, '__init__.py') | 137 path = os.path.join(extpath, e, '__init__.py') |
138 if not os.path.exists(path): | |
139 continue | |
138 | 140 |
139 if name in exts or name == '__init__' or not os.path.exists(path): | 141 if name in exts or name == '__init__': |
140 continue | 142 continue |
141 | 143 |
142 try: | 144 try: |
143 find(name) | 145 find(name) |
144 except KeyError: | 146 except KeyError: |