summaryrefslogtreecommitdiff
path: root/python/examples/export_svg.py
diff options
context:
space:
mode:
authorJosh Ferrell <josh@vector35.com>2026-04-15 11:21:40 -0400
committerJosh Ferrell <josh@vector35.com>2026-04-15 11:21:44 -0400
commitb4ccb82ea76b98457d9dc59424632ca412511ed4 (patch)
tree2eb4d7875181cee7b05413fa6dcdaea3a1d95981 /python/examples/export_svg.py
parentc08cf3f1eaa73a5171c27044100479998104d58a (diff)
[Python API] Replace bare "except:" with "except Exception:" to fix signal propagation
Diffstat (limited to 'python/examples/export_svg.py')
-rwxr-xr-xpython/examples/export_svg.py6
1 files changed, 3 insertions, 3 deletions
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' <rect class="basicblock" x="{x}" y="{y}" height="{height + 12}" width="{width + 16}" fill="rgb({rgb[0]},{rgb[1]},{rgb[2]})"/>\n'