Dont send back an rc disallowed response for commands that dont expect responses

This commit is contained in:
Kovid Goyal 2020-04-29 21:53:20 +05:30
parent fcc0707174
commit 195ea6c140
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -336,6 +336,12 @@ class Boss:
if not getattr(err, 'hide_traceback', False): if not getattr(err, 'hide_traceback', False):
response['tb'] = traceback.format_exc() response['tb'] = traceback.format_exc()
else: else:
no_response = False
try:
no_response = json.loads(cmd).get('no_response')
except Exception:
pass
if not no_response:
response = {'ok': False, 'error': 'Remote control is disabled. Add allow_remote_control to your kitty.conf'} response = {'ok': False, 'error': 'Remote control is disabled. Add allow_remote_control to your kitty.conf'}
return response return response