From 5af9dd655e7045234096513bdc076c1ab0da6c95 Mon Sep 17 00:00:00 2001 From: liuzheng712 Date: Fri, 18 Mar 2016 17:08:15 +0800 Subject: [PATCH] delete_require_chardet --- install/requirements.txt | 1 - run_server.py | 4 ---- 2 files changed, 5 deletions(-) diff --git a/install/requirements.txt b/install/requirements.txt index 405b35882..5035a6995 100644 --- a/install/requirements.txt +++ b/install/requirements.txt @@ -15,4 +15,3 @@ pyinotify==0.9.6 passlib==1.6.5 argparse==1.4.0 django_crontab==0.6.0 -chardet==2.3.0 \ No newline at end of file diff --git a/run_server.py b/run_server.py index 011f0f2b8..c15ab9b5c 100755 --- a/run_server.py +++ b/run_server.py @@ -10,7 +10,6 @@ import os.path import threading import re import functools -import chardet from django.core.signals import request_started, request_finished import tornado.ioloop @@ -412,9 +411,6 @@ class WebTerminalHandler(tornado.websocket.WebSocketHandler): if self.term.vim_flag: self.term.vim_data += recv try: - # print chardet.detect(data) - # if chardet.detect(data)['encoding'] == 'GB2312': - # data = data.decode('gb2312').encode('utf8') self.write_message(data.decode('utf-8', 'replace')) now_timestamp = time.time() self.log_time_f.write('%s %s\n' % (round(now_timestamp-pre_timestamp, 4), len(data)))