comparison mercurial/dispatch.py @ 51378:82131be5258e

dispatch: don't attempt to import debugger as bytestring The __import__ thingie needs a string, not a bytestring. Guess I'm the only one who uses this once in a while and noticed it was broken.
author Jordi Gutiérrez Hermoso <jordigh@octave.org>
date Wed, 14 Feb 2024 15:23:59 -0500
parents 18c8c18993f0
children 460e80488cf0
comparison
equal deleted inserted replaced
51377:39f349391898 51378:82131be5258e
411 # This import can be slow for fancy debuggers, so only 411 # This import can be slow for fancy debuggers, so only
412 # do it when absolutely necessary, i.e. when actual 412 # do it when absolutely necessary, i.e. when actual
413 # debugging has been requested 413 # debugging has been requested
414 with demandimport.deactivated(): 414 with demandimport.deactivated():
415 try: 415 try:
416 debugmod = __import__(debugger) 416 debugmod = __import__(pycompat.sysstr(debugger))
417 except ImportError: 417 except ImportError:
418 pass # Leave debugmod = pdb 418 pass # Leave debugmod = pdb
419 419
420 debugtrace[debugger] = debugmod.set_trace 420 debugtrace[debugger] = debugmod.set_trace
421 debugmortem[debugger] = debugmod.post_mortem 421 debugmortem[debugger] = debugmod.post_mortem