From 95bb070a6b337933007566f09a9cea549b6e546d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pawe=C5=82=20Jastrz=C4=99bski?=
Date: Tue, 29 Oct 2013 11:00:48 +0100
Subject: [PATCH] Added content server multithreading
---
kcc/KCC_gui.py | 24 +++++++++---------------
1 file changed, 9 insertions(+), 15 deletions(-)
diff --git a/kcc/KCC_gui.py b/kcc/KCC_gui.py
index 86f89da..193435e 100644
--- a/kcc/KCC_gui.py
+++ b/kcc/KCC_gui.py
@@ -35,6 +35,7 @@ import socket
import string
from KCC_rc_web import WebContent
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
+from SocketServer import ThreadingMixIn
from image import ProfileData
from subprocess import call, Popen, STDOUT, PIPE
from PyQt4 import QtGui, QtCore
@@ -78,10 +79,6 @@ class HTMLStripper(HTMLParser):
class WebServerHandler(BaseHTTPRequestHandler):
- #noinspection PyShadowingBuiltins
- def log_message(self, format, *args):
- pass
-
#noinspection PyAttributeOutsideInit
def do_GET(self):
if self.path == '/':
@@ -114,17 +111,11 @@ class WebServerHandler(BaseHTTPRequestHandler):
'alt="KCC Logo" src="' + GUIMain.webContent.logo + '" /> -
\n')
if len(GUIMain.completedWork) > 0 and not GUIMain.conversionAlive:
for key in sorted(GUIMain.completedWork.iterkeys()):
- self.wfile.write('Only one file is available at once.
'
- 'Refresh page after successful download.
\n'
- '
>>> ' + string.split(key, '.')[0] +
- ' <<<
\n')
- break
+ self.wfile.write('' + string.split(key, '.')[0] + '
\n')
else:
self.wfile.write('No downloads are available.
'
'Convert some files and refresh this page.
\n')
- self.wfile.write('
- Refresh page -'
- '
\n'
- '\n'
+ self.wfile.write('\n'
'