Skip to content

Instantly share code, notes, and snippets.

@maliciousgroup
Created April 7, 2021 21:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maliciousgroup/809a8ac00aced01b0d06b16fccea78a9 to your computer and use it in GitHub Desktop.
Save maliciousgroup/809a8ac00aced01b0d06b16fccea78a9 to your computer and use it in GitHub Desktop.
import asyncio
from src.core.base.BaseCommand import BaseCommand
class ExitCommand(BaseCommand):
helper = {
'name': 'exit',
'help': 'This command will exit the application',
'usage': 'exit'
}
def __init__(self, command: str, print_queue: asyncio.Queue):
"""
Class 'Constructor-Like' Initializer
:param command: User-input command
:param print_queue: Print Queue
:return None
"""
super().__init__()
self.command: str = command
self.pq: asyncio.Queue = print_queue
async def main(self) -> None:
"""
Class Coroutine that starts command logic
:return: None
"""
await self.execute()
async def execute(self) -> None:
"""
Class Coroutine that starts command execution logic
:return: None
"""
raise EOFError
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment