Skip to content

Commit 9173349

Browse files
committed
Fix exec() call for Python 3.13+
1 parent 8471637 commit 9173349

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bdsf/plotresults.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ def plotresults(img, ch0_image=True, rms_image=True, mean_image=True,
254254
cmd = 'ax' + str(i+1) + ' = pl.subplot(' + str(numx) + \
255255
', ' + str(numy) + ', ' + str(i+1) + ', sharex=ax1' + \
256256
', sharey=ax1)'
257-
exec(cmd)
257+
exec(cmd, globals())
258258
if 'PSF' in titles[i]:
259259
im = image # note: im is used in cmd string below
260260
else:
@@ -358,7 +358,7 @@ def plotresults(img, ch0_image=True, rms_image=True, mean_image=True,
358358
elif image == 'seds':
359359
cmd = 'ax' + str(i+1) + ' = pl.subplot(' + str(numx) + \
360360
', ' + str(numy) + ', ' + str(i+1) + ')'
361-
exec(cmd)
361+
exec(cmd, globals())
362362
ax = pl.gca()
363363
plot_sed(sed_src, ax)
364364

0 commit comments

Comments
 (0)