Browse Source

Remove eval from from run_hook

small improvement to remove eval using builtin function `getattr`.
283
vrde 12 years ago
parent
commit
32abe2dd04
  1. 9
      gui/gui_classic/main_window.py

9
gui/gui_classic/main_window.py

@ -466,10 +466,11 @@ class ElectrumWindow(QMainWindow):
for p in self.plugins:
if not p.is_enabled():
continue
try:
f = eval('p.'+name)
except:
continue
f = getattr(p, name, None)
if not callable(f):
return
try:
apply(f, args)
except:

Loading…
Cancel
Save