mercurial/extensions.py
changeset 48359 e4e2ce328599
parent 48358 c6d44457f7e3
child 48360 e4acdf5d94a2
equal deleted inserted replaced
48358:c6d44457f7e3 48359:e4e2ce328599
   305             try:
   305             try:
   306                 load(ui, name, path, loadingtime)
   306                 load(ui, name, path, loadingtime)
   307             except Exception as inst:
   307             except Exception as inst:
   308                 msg = stringutil.forcebytestr(inst)
   308                 msg = stringutil.forcebytestr(inst)
   309                 if path:
   309                 if path:
   310                     ui.warn(
   310                     error_msg = _(b"failed to import extension %s from %s: %s")
   311                         _(b"*** failed to import extension %s from %s: %s\n")
   311                     error_msg %= (name, path, msg)
   312                         % (name, path, msg)
       
   313                     )
       
   314                 else:
   312                 else:
   315                     ui.warn(
   313                     error_msg = _(b"failed to import extension %s: %s")
   316                         _(b"*** failed to import extension %s: %s\n")
   314                     error_msg %= (name, msg)
   317                         % (name, msg)
   315                 ui.warn((b"*** %s\n") % error_msg)
   318                     )
       
   319                 if isinstance(inst, error.Hint) and inst.hint:
   316                 if isinstance(inst, error.Hint) and inst.hint:
   320                     ui.warn(_(b"*** (%s)\n") % inst.hint)
   317                     ui.warn(_(b"*** (%s)\n") % inst.hint)
   321                 ui.traceback()
   318                 ui.traceback()
   322 
   319 
   323     ui.log(
   320     ui.log(