webssh

Web based ssh client https://github.com/huashengdun/webssh webssh.huashengdun.org/
git clone http://git.hanabi.in/repos/webssh.git
Log | Files | Refs | README | LICENSE

commit f77aa11ee5e0dbd611179e2d695c37d63344606c
parent c3542a5e42ebef2732a387741bba0815728c31c0
Author: Sheng <webmaster0115@gmail.com>
Date:   Mon,  9 Apr 2018 09:35:43 +0800

Changed string formatting

Diffstat:
Mmain.py | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/main.py b/main.py @@ -73,12 +73,12 @@ class Worker(object): if errno_from_exception(e) in _ERRNO_CONNRESET: self.close() else: - logging.debug('"{}" from {}:{}'.format(data, *self.dst_addr)) + logging.debug('{!r} from {}:{}'.format(data, *self.dst_addr)) if not data: self.close() return - logging.debug('"{}" to {}:{}'.format(data, *self.handler.src_addr)) + logging.debug('{!r} to {}:{}'.format(data, *self.handler.src_addr)) try: self.handler.write_message(data) except tornado.websocket.WebSocketClosedError: @@ -90,7 +90,7 @@ class Worker(object): return data = ''.join(self.data_to_dst) - logging.debug('"{}" to {}:{}'.format(data, *self.dst_addr)) + logging.debug('{!r} to {}:{}'.format(data, *self.dst_addr)) try: sent = self.chan.send(data) @@ -288,7 +288,7 @@ class WsockHandler(MixinHandler, tornado.websocket.WebSocketHandler): self.close() def on_message(self, message): - logging.debug('"{}" from {}:{}'.format(message, *self.src_addr)) + logging.debug('{!r} from {}:{}'.format(message, *self.src_addr)) worker = self.worker_ref() worker.data_to_dst.append(message) worker.on_write()