remove reminances of cherrypy

This commit is contained in:
Tim Bentley 2013-09-14 20:16:14 +01:00
parent 2531513ec5
commit b868ecc57d
4 changed files with 14 additions and 18 deletions

View File

@ -75,12 +75,6 @@ try:
ICU_VERSION = 'OK'
except ImportError:
ICU_VERSION = '-'
try:
import cherrypy
CHERRYPY_VERSION = cherrypy.__version__
except ImportError:
CHERRYPY_VERSION = '-'
try:
WEBKIT_VERSION = QtWebKit.qWebKitVersion()
except AttributeError:
@ -140,7 +134,6 @@ class ExceptionForm(QtGui.QDialog, Ui_ExceptionDialog):
'Chardet: %s\n' % CHARDET_VERSION + \
'PyEnchant: %s\n' % ENCHANT_VERSION + \
'Mako: %s\n' % MAKO_VERSION + \
'CherryPy: %s\n' % CHERRYPY_VERSION + \
'pyICU: %s\n' % ICU_VERSION + \
'pyUNO bridge: %s\n' % self._pyuno_import() + \
'VLC: %s\n' % VLC_VERSION

View File

@ -28,6 +28,7 @@
###############################################################################
import logging
import time
from openlp.core.lib import Plugin, StringContent, translate, build_icon
from openlp.plugins.remotes.lib import RemoteTab, OpenLPServer
@ -66,7 +67,6 @@ class RemotesPlugin(Plugin):
log.debug('initialise')
super(RemotesPlugin, self).initialise()
self.server = OpenLPServer()
#self.server.start_server()
def finalise(self):
"""
@ -107,5 +107,6 @@ class RemotesPlugin(Plugin):
Called when Config is changed to restart the server on new address or port
"""
log.debug('remote config changed')
self.main_window.information_message(translate('RemotePlugin', 'Configuration Change'),
translate('RemotePlugin', 'OpenLP will need to be restarted for the Remote changes to become active.'))
self.finalise()
time.sleep(0.5)
self.initialise()

View File

@ -48,6 +48,7 @@ except ImportError:
IS_WIN = sys.platform.startswith('win')
VERS = {
'Python': '2.6',
'PyQt4': '4.6',
@ -82,7 +83,6 @@ MODULES = [
'enchant',
'bs4',
'mako',
'cherrypy',
'uno',
'icu',
'bs4',
@ -98,6 +98,7 @@ OPTIONAL_MODULES = [
w = sys.stdout.write
def check_vers(version, required, text):
if not isinstance(version, str):
version = '.'.join(map(str, version))
@ -111,13 +112,16 @@ def check_vers(version, required, text):
w('FAIL' + os.linesep)
return False
def print_vers_fail(required, text):
print(' %s >= %s ... FAIL' % (text, required))
def verify_python():
if not check_vers(list(sys.version_info), VERS['Python'], text='Python'):
exit(1)
def verify_versions():
print('Verifying version of modules...')
try:
@ -138,6 +142,7 @@ def verify_versions():
except ImportError:
print_vers_fail(VERS['enchant'], 'enchant')
def check_module(mod, text='', indent=' '):
space = (30 - len(mod) - len(text)) * ' '
w(indent + '%s%s... ' % (mod, text) + space)
@ -148,6 +153,7 @@ def check_module(mod, text='', indent=' '):
w('FAIL')
w(os.linesep)
def verify_pyenchant():
w('Enchant (spell checker)... ')
try:
@ -160,6 +166,7 @@ def verify_pyenchant():
except ImportError:
w('FAIL' + os.linesep)
def verify_pyqt():
w('Qt4 image formats... ')
try:
@ -174,22 +181,19 @@ def verify_pyqt():
except ImportError:
w('FAIL' + os.linesep)
def main():
verify_python()
print('Checking for modules...')
for m in MODULES:
check_module(m)
print('Checking for optional modules...')
for m in OPTIONAL_MODULES:
check_module(m[0], text=m[1])
if IS_WIN:
print('Checking for Windows specific modules...')
for m in WIN32_MODULES:
check_module(m)
verify_versions()
verify_pyqt()
verify_pyenchant()

View File

@ -7,9 +7,8 @@ from unittest import TestCase
from tempfile import mkstemp
from mock import MagicMock
import urllib.request, urllib.error, urllib.parse
import cherrypy
from BeautifulSoup import BeautifulSoup
from bs4 import BeautifulSoup
from openlp.core.lib import Settings
from openlp.plugins.remotes.lib.httpserver import HttpServer
@ -133,6 +132,5 @@ def process_http_request(url_path, *args):
``*args``
Some args.
"""
cherrypy.response.status = 200
return None