##// END OF EJS Templates
use a proper test instead of catching every exception
Benoit Boissinot -
r1956:16750010 default
parent child Browse files
Show More
@@ -789,13 +789,11 b' def rcpath():'
789 _rcpath = []
789 _rcpath = []
790 for p in os.environ['HGRCPATH'].split(os.pathsep):
790 for p in os.environ['HGRCPATH'].split(os.pathsep):
791 if not p: continue
791 if not p: continue
792 try:
792 if os.path.isdir(p):
793 for f in os.listdir(p):
793 for f in os.listdir(p):
794 if f.endswith('.rc'):
794 if f.endswith('.rc'):
795 _rcpath.append(os.path.join(p, f))
795 _rcpath.append(os.path.join(p, f))
796 continue
796 else:
797 except:
798 pass
799 _rcpath.append(p)
797 _rcpath.append(p)
800 else:
798 else:
801 _rcpath = os_rcpath()
799 _rcpath = os_rcpath()
General Comments 0
You need to be logged in to leave comments. Login now