##// END OF EJS Templates
[issue21] cannot debug extension...
Benoit Boissinot -
r1424:918cb47d default
parent child Browse files
Show More
@@ -2068,11 +2068,16 b' def dispatch(args):'
2068 u = ui.ui()
2068 u = ui.ui()
2069 external = []
2069 external = []
2070 for x in u.extensions():
2070 for x in u.extensions():
2071 def on_exception(Exception, inst):
2072 u.warn(_("*** failed to import extension %s\n") % x[1])
2073 u.warn("%s\n" % inst)
2074 if "--traceback" in sys.argv[1:]:
2075 traceback.print_exc()
2071 if x[1]:
2076 if x[1]:
2072 try:
2077 try:
2073 mod = imp.load_source(x[0], x[1])
2078 mod = imp.load_source(x[0], x[1])
2074 except:
2079 except Exception, inst:
2075 u.warn(_("*** failed to import extension %s\n") % x[1])
2080 on_exception(Exception, inst)
2076 continue
2081 continue
2077 else:
2082 else:
2078 def importh(name):
2083 def importh(name):
@@ -2083,8 +2088,8 b' def dispatch(args):'
2083 return mod
2088 return mod
2084 try:
2089 try:
2085 mod = importh(x[0])
2090 mod = importh(x[0])
2086 except:
2091 except Exception, inst:
2087 u.warn(_("failed to import extension %s\n") % x[0])
2092 on_exception(Exception, inst)
2088 continue
2093 continue
2089
2094
2090 external.append(mod)
2095 external.append(mod)
General Comments 0
You need to be logged in to leave comments. Login now