/locks should always respond, even if there's no locks

closes #4942
This commit is contained in:
Matthias
2021-05-15 10:50:00 +02:00
parent 0ace35bf3d
commit e1447f955c
2 changed files with 8 additions and 0 deletions

View File

@@ -751,6 +751,9 @@ class Telegram(RPCHandler):
Returns the currently active locks
"""
rpc_locks = self._rpc._rpc_locks()
if not rpc_locks['locks']:
self._send_msg('No active locks.', parse_mode=ParseMode.HTML)
for locks in chunks(rpc_locks['locks'], 25):
message = tabulate([[
lock['id'],