[pywin32-checkins] /hgroot/pywin32/pywin32: Prevent pythonwin hanging when configur...
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: <pyw...@li...> - 2014-04-01 04:17:26
|
changeset d42964909493 in /hgroot/pywin32/pywin32 details: http://pywin32.hg.sourceforge.net/hgweb/pywin32/pywin32/hgroot/pywin32/pywin32?cmd=changeset;node=d42964909493 summary: Prevent pythonwin hanging when configuring the Tools menu in View->Options diffstat: Pythonwin/pywin/framework/toolmenu.py | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diffs (15 lines): diff -r 50ddf812a6d7 -r d42964909493 Pythonwin/pywin/framework/toolmenu.py --- a/Pythonwin/pywin/framework/toolmenu.py Mon Mar 03 09:22:38 2014 -0500 +++ b/Pythonwin/pywin/framework/toolmenu.py Tue Apr 01 15:17:20 2014 +1100 @@ -177,7 +177,10 @@ itemLook = 0 while 1: try: - items.append( ( self.listControl.GetItemText(itemLook, 0), self.listControl.GetItemText(itemLook, 1) ) ) + text = self.listControl.GetItemText(itemLook, 0); + if not text: + break + items.append( (text, self.listControl.GetItemText(itemLook, 1)) ) except win32ui.error: # no more items! break |