mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-28 16:01:30 +00:00
Remove eval from from run_hook
small improvement to remove eval using builtin function `getattr`.
This commit is contained in:
parent
01349f6528
commit
32abe2dd04
1 changed files with 5 additions and 4 deletions
|
@ -466,10 +466,11 @@ 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
|
||||||
try:
|
|
||||||
f = eval('p.'+name)
|
f = getattr(p, name, None)
|
||||||
except:
|
if not callable(f):
|
||||||
continue
|
return
|
||||||
|
|
||||||
try:
|
try:
|
||||||
apply(f, args)
|
apply(f, args)
|
||||||
except:
|
except:
|
||||||
|
|
Loading…
Add table
Reference in a new issue