mirror of
https://github.com/onyx-and-iris/q3rcon-tui.git
synced 2026-02-26 03:09:09 +00:00
move guard clause out of context block
This commit is contained in:
parent
3181377c18
commit
97458682ea
@ -51,14 +51,15 @@ class RconApp(App):
|
||||
if not settings.append:
|
||||
self.query_one('#response', RichLog).clear()
|
||||
|
||||
try:
|
||||
async with Client(
|
||||
settings.host, settings.port, settings.password
|
||||
) as client:
|
||||
cmd = self.query_one('#command', Input).value.strip()
|
||||
if not cmd:
|
||||
self.app.bell()
|
||||
return
|
||||
|
||||
try:
|
||||
async with Client(
|
||||
settings.host, settings.port, settings.password
|
||||
) as client:
|
||||
response = await client.send_command(cmd)
|
||||
self.query_one('#response', RichLog).write(
|
||||
self.writable.parse(cmd, response)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user