##// END OF EJS Templates
extensions: catch OSError when hgext is not accessible (issue1708)...
Cédric Duval -
r8964:119d1f66 default
parent child Browse files
Show More
@@ -125,9 +125,14 b' def disabled():'
125 import hgext
125 import hgext
126 extpath = os.path.dirname(os.path.abspath(hgext.__file__))
126 extpath = os.path.dirname(os.path.abspath(hgext.__file__))
127
127
128 try: # might not be a filesystem path
129 files = os.listdir(extpath)
130 except OSError:
131 return None, 0
132
128 exts = {}
133 exts = {}
129 maxlength = 0
134 maxlength = 0
130 for e in os.listdir(extpath):
135 for e in files:
131
136
132 if e.endswith('.py'):
137 if e.endswith('.py'):
133 name = e.rsplit('.', 1)[0]
138 name = e.rsplit('.', 1)[0]
General Comments 0
You need to be logged in to leave comments. Login now