Working development server (no encryption now)
This commit is contained in:
18
dragonion_server/cli/utils/groups.py
Normal file
18
dragonion_server/cli/utils/groups.py
Normal file
@@ -0,0 +1,18 @@
|
||||
import click
|
||||
import typing as t
|
||||
|
||||
|
||||
class ModuleGroup(click.Group):
|
||||
def __init__(
|
||||
self,
|
||||
name: t.Optional[str] = None,
|
||||
commands: t.Optional[
|
||||
t.Union[t.Dict[str, click.Command], t.Sequence[click.Command]]
|
||||
] = None,
|
||||
**attrs: t.Any,
|
||||
) -> None:
|
||||
new_commands = dict()
|
||||
for command_key in commands.keys():
|
||||
new_commands[f'{name}-{command_key}'] = commands[command_key]
|
||||
|
||||
super().__init__(name, new_commands, **attrs)
|
||||
Reference in New Issue
Block a user