From b4ccb82ea76b98457d9dc59424632ca412511ed4 Mon Sep 17 00:00:00 2001 From: Josh Ferrell Date: Wed, 15 Apr 2026 11:21:40 -0400 Subject: [Python API] Replace bare "except:" with "except Exception:" to fix signal propagation --- python/examples/export_svg.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'python/examples/export_svg.py') diff --git a/python/examples/export_svg.py b/python/examples/export_svg.py index e9ce9299..f98b970e 100755 --- a/python/examples/export_svg.py +++ b/python/examples/export_svg.py @@ -97,14 +97,14 @@ def rgbStr(tokenType): '''Given a token string name, look up the theme color for it and return as rbg(x,y,z) str''' try: color = eval(f'getThemeColor(ThemeColor.{tokenType})') - except: + except Exception: color = None if (not color): try: ctx = UIContext.activeContext() view_frame = ctx.getCurrentViewFrame() color = eval(f'getTokenColor(view_frame, InstructionTextTokenType.{tokenType})') - except: + except Exception: return 'rgb(224, 224, 224)' r = color.getRgb()[0] g = color.getRgb()[1] @@ -301,7 +301,7 @@ def render_svg(function, offset, mode, form, showOpcodes, showAddresses, orignam rgb = colors[color_str] else: rgb = [bb.highlight.red, bb.highlight.green, bb.highlight.blue] - except: + except Exception: pass output += f' \n' -- cgit v1.3.1