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 746982b001f10d98c686ebf923171c5f4cedfc6b
parent c2c81aaeae66039d1264147da87ab1da613a63c2
Author: Sheng <webmaster0115@gmail.com>
Date:   Wed, 17 Oct 2018 19:34:09 +0800

Use method format instead of %

Diffstat:
Mwebssh/handler.py | 5++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/webssh/handler.py b/webssh/handler.py @@ -45,9 +45,8 @@ class MixinHandler(object): def initialize(self): if self.is_forbidden(): - self.request.connection.stream.write( - b'%s 403 Forbidden\r\n\r\n' % to_bytes(self.request.version) - ) + result = '{} 403 Forbidden\r\n\r\n'.format(self.request.version) + self.request.connection.stream.write(to_bytes(result)) self.request.connection.close() raise ValueError('Accesss denied')