mirror of
https://github.com/onyx-and-iris/q3rcon-cli.git
synced 2026-03-24 02:39:18 +00:00
move empty response test into {OutConsole}.print_response()
This commit is contained in:
parent
3062cfa4d8
commit
68f917286f
@ -117,8 +117,7 @@ class Q3rconCli(Command):
|
||||
f"Timeout waiting for response for command: '{command}'"
|
||||
)
|
||||
|
||||
if response:
|
||||
console.out.print_response(response)
|
||||
console.out.print_response(response)
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
@ -50,9 +50,8 @@ class OutConsole(Console):
|
||||
return OutConsole.COLOUR_CODE_REGEX.sub('', s)
|
||||
|
||||
def print_response(self, response: str):
|
||||
response = self._remove_colour_codes(response).removeprefix('print\n')
|
||||
|
||||
cprint(response, fg=self.style)
|
||||
if response := self._remove_colour_codes(response).removeprefix('print\n'):
|
||||
cprint(response, fg=self.style)
|
||||
|
||||
def print_status(self, response: str):
|
||||
_slots = []
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user