##// END OF EJS Templates
Warn on failure to import an extension
mpm@selenic.com -
r1342:5a42da1d default
parent child Browse files
Show More
@@ -2046,7 +2046,11 b' def dispatch(args):'
2046 2046 external = []
2047 2047 for x in u.extensions():
2048 2048 if x[1]:
2049 mod = imp.load_source(x[0], x[1])
2049 try:
2050 mod = imp.load_source(x[0], x[1])
2051 except:
2052 u.warn("*** failed to import extension %s\n" % x[1])
2053 continue
2050 2054 else:
2051 2055 def importh(name):
2052 2056 mod = __import__(name)
@@ -2054,7 +2058,12 b' def dispatch(args):'
2054 2058 for comp in components[1:]:
2055 2059 mod = getattr(mod, comp)
2056 2060 return mod
2057 mod = importh(x[0])
2061 try:
2062 mod = importh(x[0])
2063 except:
2064 u.warn("failed to import extension %s\n" % x[0])
2065 continue
2066
2058 2067 external.append(mod)
2059 2068 for x in external:
2060 2069 cmdtable = getattr(x, 'cmdtable', {})
General Comments 0
You need to be logged in to leave comments. Login now