diff --git a/example_cmd.py b/example_cmd.py index 35d3df2..75385a8 100644 --- a/example_cmd.py +++ b/example_cmd.py @@ -4,17 +4,17 @@ from commands import BaseCommand, register_cmd class example_cmd(BaseCommand): def __call__(self, *args, **kwargs): - def input_generator(): - yield 'example' - yield 'command' - return input_generator + def output_generator(): + yield b'example' + yield b'command' + return output_generator() @register_cmd class echo(BaseCommand): def __call__(self, *args, **kwargs): - def input_generator(): + def output_generator(): for line in self.input_cmd(): yield line - return input_generator + return output_generator()