fixed command parser plugin command building

This commit is contained in:
Kevin Froman 2019-09-06 13:23:01 -05:00
parent d0fab00e3b
commit 41eab0e98d
2 changed files with 1 additions and 2 deletions

View File

@ -37,7 +37,6 @@ def add_bridges(torrc: str)->str:
return torrc
class NetController:
'''
This class handles hidden service setup on Tor and I2P

View File

@ -27,13 +27,13 @@ from . import arguments, recommend
plugin_command = lambda cmd: 'on_%s_cmd' % (cmd,)
def register_plugin_commands(cmd):
cmd = 'on_%s_cmd' % (cmd,)
plugin_cmd = plugin_command(cmd)
for pl in onionrplugins.get_enabled_plugins():
pl = onionrplugins.get_plugin(pl)
if hasattr(pl, plugin_cmd):
getattr(pl, plugin_cmd)(onionrpluginapi.PluginAPI)
return True
return False
def register():
"""Registers commands and handles help command processing"""