7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-11 10:20:11 +00:00

Handle alternate exception

Apparently, some versions throw one exception, some another.  We really
don't care which, we just want an ID value
This commit is contained in:
Seth Hillbrand 2021-10-20 09:28:00 -07:00
parent b1f17dc927
commit 93b25b115b

View File

@ -19,7 +19,7 @@ from wx import stc
def KiNewId():
try:
wx.NewIdRef
except NameError:
except ( NameError, AttributeError ):
return wx.NewId()
else:
return wx.NewIdRef()