From 93b25b115bd1ead21440d36d3d492e32dd99b1f8 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Wed, 20 Oct 2021 09:28:00 -0700 Subject: [PATCH] Handle alternate exception Apparently, some versions throw one exception, some another. We really don't care which, we just want an ID value --- scripting/kicad_pyshell/kicad_pyeditor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripting/kicad_pyshell/kicad_pyeditor.py b/scripting/kicad_pyshell/kicad_pyeditor.py index 0ab700ad49..b44488a27b 100644 --- a/scripting/kicad_pyshell/kicad_pyeditor.py +++ b/scripting/kicad_pyshell/kicad_pyeditor.py @@ -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()