[projects/pld-ftp-admin] ftpiod: one lock per line in pfa-dump-locks
arekm
arekm at pld-linux.org
Sat Oct 24 11:45:23 CEST 2026
commit c182776056118fac34dcdb7205e8f55597cb67b7
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Tue Oct 20 15:29:46 2026 +0200
ftpiod: one lock per line in pfa-dump-locks
modules/cmds.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/modules/cmds.py b/modules/cmds.py
index 2172325..3980eab 100644
--- a/modules/cmds.py
+++ b/modules/cmds.py
@@ -64,15 +64,15 @@ def cmd_lock_hard(con, arg):
def cmd_show_locks(con):
cmd_log(con, "Dumping locks data:");
if len(locks):
- res = ""
+ res = []
for lockdata in locks.items():
tree, data = lockdata
msg = "Tree: %s, Conn name: %s, Hard Lock: %s, Time: %s" % (
tree, data['name'], data['hard'], time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(data['time'])))
cmd_log(con, msg)
- res = res + msg
+ res.append(msg)
# con.sock.send(bytearray("BLOB:%d" % len(res), encoding='utf-8')))
- con.sock.send(bytearray(res, encoding='utf-8'))
+ con.sock.send(bytearray('\n'.join(res), encoding='utf-8'))
else:
cmd_log(con, "No locks found.")
con.sock.send(bytearray("NLCK", encoding='utf-8'))
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/projects/pld-ftp-admin.git/commitdiff/e14cb7d4d74f8bdd9368d9645ecaf49593cf6335
More information about the pld-cvs-commit
mailing list