Skip to content

Commit e2645cf

Browse files
authored
Gracefully fallback to disabling the cmdui in pywin.framework.dbgcommands.OnUpdateDebuggerBar (#2320)
1 parent ee0e8bb commit e2645cf

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

CHANGES.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Notable changes in recent builds.
1+
Notable changes in recent builds.
22

33
Maintained by hand, so what's "notable" is subjective! Contributors are
44
encouraged to add entries for their work.

Pythonwin/pywin/framework/dbgcommands.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,7 @@ def OnUpdateClearAllBreakpoints(self, cmdui):
171171
cmdui.Enable(d is None or len(d.breaks) != 0)
172172

173173
def OnUpdateDebuggerBar(self, cmdui):
174-
name, always = IdToBarNames.get(cmdui.m_nID)
175-
enabled = always
174+
name, enabled = IdToBarNames.get(cmdui.m_nID, (None, 0))
176175
d = self._GetDebugger()
177176
if d is not None and d.IsDebugging() and name is not None:
178177
enabled = 1

0 commit comments

Comments
 (0)