changeset 1956 | 16750010813d |
parent 1951 | 696230e52e4d |
child 1958 | f92cf4a8cedd |
--- a/mercurial/util.py +++ b/mercurial/util.py @@ -789,14 +789,12 @@ def rcpath(): _rcpath = [] for p in os.environ['HGRCPATH'].split(os.pathsep): if not p: continue - try: + if os.path.isdir(p): for f in os.listdir(p): if f.endswith('.rc'): _rcpath.append(os.path.join(p, f)) - continue - except: - pass - _rcpath.append(p) + else: + _rcpath.append(p) else: _rcpath = os_rcpath() return _rcpath