Merge pull request #297 from vrde/fix-remove-eval
Remove eval from run_hook
This commit is contained in:
@@ -466,12 +466,13 @@ class ElectrumWindow(QMainWindow):
|
|||||||
for p in self.plugins:
|
for p in self.plugins:
|
||||||
if not p.is_enabled():
|
if not p.is_enabled():
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
f = getattr(p, name, None)
|
||||||
|
if not callable(f):
|
||||||
|
return
|
||||||
|
|
||||||
try:
|
try:
|
||||||
f = eval('p.'+name)
|
f(*args)
|
||||||
except:
|
|
||||||
continue
|
|
||||||
try:
|
|
||||||
apply(f, args)
|
|
||||||
except:
|
except:
|
||||||
print_error("Plugin error")
|
print_error("Plugin error")
|
||||||
traceback.print_exc(file=sys.stdout)
|
traceback.print_exc(file=sys.stdout)
|
||||||
|
|||||||
Reference in New Issue
Block a user