Skip to content
This repository has been archived by the owner on Oct 27, 2021. It is now read-only.

Commit

Permalink
Removed use of eval
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed May 10, 2016
1 parent b1a528b commit 6475530
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Scripts/enhancer.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def __init__(self, master, image, name, enhancer, lo, hi):
s.pack()

def update(self, value):
self.value = eval(value)
self.value = float(value)
self.tkim.paste(self.enhancer.enhance(self.value))

#
Expand Down
2 changes: 1 addition & 1 deletion Scripts/pildriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def do_filter(self):
Process the top image with the given filter.
"""
from PIL import ImageFilter
imageFilter = eval("ImageFilter." + self.do_pop().upper())
imageFilter = getattr(ImageFilter, self.do_pop().upper())
image = self.do_pop()
self.push(image.filter(imageFilter))

Expand Down
2 changes: 1 addition & 1 deletion Scripts/thresholder.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def __init__(self, master, im, value=128):
# self.redraw()

def update_scale(self, value):
self.value = eval(value)
self.value = float(value)

self.redraw()

Expand Down

0 comments on commit 6475530

Please sign in to comment.