Merge pull request #297 from vrde/fix-remove-eval

Remove eval from run_hook
This commit is contained in:
ThomasV 2013-09-17 10:53:34 -07:00
commit 200f3683d9
1 changed files with 6 additions and 5 deletions

View File

@ -466,12 +466,13 @@ class ElectrumWindow(QMainWindow):
for p in self.plugins:
if not p.is_enabled():
continue
f = getattr(p, name, None)
if not callable(f):
return
try:
f = eval('p.'+name)
except:
continue
try:
apply(f, args)
f(*args)
except:
print_error("Plugin error")
traceback.print_exc(file=sys.stdout)