src/reportlab/graphics/testshapes.py
changeset 4551 d357e2acc856
parent 4528 e09377955af8
child 4567 5612ef8ef0a8
--- a/src/reportlab/graphics/testshapes.py	Thu Oct 24 15:53:59 2019 +0100
+++ b/src/reportlab/graphics/testshapes.py	Thu Oct 24 16:07:15 2019 +0100
@@ -487,11 +487,14 @@
     return funcNames
 
 def _evalFuncDrawing(name, D, l=None, g=None):
+    if g is None: g = globals()
+    if l is None: l = locals()
+    func = l.get(name,g.get(name,None))
     try:
-        d = eval(name + '()', g or globals(), l or locals())
+        d = func()
     except:
         d = getFailedDrawing(name)
-    D.append((d, eval(name + '.__doc__'), name[3:]))
+    D.append((d, getattr(func,'.__doc__',''), name[3:]))
 
 def getAllTestDrawings(doTTF=1):
     D = []