mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
Kill more lingering string exceptions in Lib/plat-mac/.
This commit is contained in:
parent
b9678e71f3
commit
6cd2a2036d
3 changed files with 9 additions and 7 deletions
|
@ -229,7 +229,7 @@ class Application:
|
|||
def asyncevents(self, onoff):
|
||||
"""asyncevents - Set asynchronous event handling on or off"""
|
||||
if MacOS.runtimemodel == 'macho':
|
||||
raise 'Unsupported in MachoPython'
|
||||
raise NotImplementedError('Unsupported in MachoPython')
|
||||
old = self._doing_asyncevents
|
||||
if old:
|
||||
MacOS.SetEventHandler()
|
||||
|
@ -577,7 +577,7 @@ class Menu:
|
|||
|
||||
def delitem(self, item):
|
||||
if item != len(self.items):
|
||||
raise 'Can only delete last item of a menu'
|
||||
raise ValueError('Can only delete last item of a menu')
|
||||
self.menu.DeleteMenuItem(item)
|
||||
del self.items[item-1]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue