forked from openlp/openlp
remove reminances of cherrypy
This commit is contained in:
parent
2531513ec5
commit
b868ecc57d
@ -75,12 +75,6 @@ try:
|
|||||||
ICU_VERSION = 'OK'
|
ICU_VERSION = 'OK'
|
||||||
except ImportError:
|
except ImportError:
|
||||||
ICU_VERSION = '-'
|
ICU_VERSION = '-'
|
||||||
try:
|
|
||||||
import cherrypy
|
|
||||||
CHERRYPY_VERSION = cherrypy.__version__
|
|
||||||
except ImportError:
|
|
||||||
CHERRYPY_VERSION = '-'
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
WEBKIT_VERSION = QtWebKit.qWebKitVersion()
|
WEBKIT_VERSION = QtWebKit.qWebKitVersion()
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
@ -140,7 +134,6 @@ class ExceptionForm(QtGui.QDialog, Ui_ExceptionDialog):
|
|||||||
'Chardet: %s\n' % CHARDET_VERSION + \
|
'Chardet: %s\n' % CHARDET_VERSION + \
|
||||||
'PyEnchant: %s\n' % ENCHANT_VERSION + \
|
'PyEnchant: %s\n' % ENCHANT_VERSION + \
|
||||||
'Mako: %s\n' % MAKO_VERSION + \
|
'Mako: %s\n' % MAKO_VERSION + \
|
||||||
'CherryPy: %s\n' % CHERRYPY_VERSION + \
|
|
||||||
'pyICU: %s\n' % ICU_VERSION + \
|
'pyICU: %s\n' % ICU_VERSION + \
|
||||||
'pyUNO bridge: %s\n' % self._pyuno_import() + \
|
'pyUNO bridge: %s\n' % self._pyuno_import() + \
|
||||||
'VLC: %s\n' % VLC_VERSION
|
'VLC: %s\n' % VLC_VERSION
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
import time
|
||||||
|
|
||||||
from openlp.core.lib import Plugin, StringContent, translate, build_icon
|
from openlp.core.lib import Plugin, StringContent, translate, build_icon
|
||||||
from openlp.plugins.remotes.lib import RemoteTab, OpenLPServer
|
from openlp.plugins.remotes.lib import RemoteTab, OpenLPServer
|
||||||
@ -66,7 +67,6 @@ class RemotesPlugin(Plugin):
|
|||||||
log.debug('initialise')
|
log.debug('initialise')
|
||||||
super(RemotesPlugin, self).initialise()
|
super(RemotesPlugin, self).initialise()
|
||||||
self.server = OpenLPServer()
|
self.server = OpenLPServer()
|
||||||
#self.server.start_server()
|
|
||||||
|
|
||||||
def finalise(self):
|
def finalise(self):
|
||||||
"""
|
"""
|
||||||
@ -107,5 +107,6 @@ class RemotesPlugin(Plugin):
|
|||||||
Called when Config is changed to restart the server on new address or port
|
Called when Config is changed to restart the server on new address or port
|
||||||
"""
|
"""
|
||||||
log.debug('remote config changed')
|
log.debug('remote config changed')
|
||||||
self.main_window.information_message(translate('RemotePlugin', 'Configuration Change'),
|
self.finalise()
|
||||||
translate('RemotePlugin', 'OpenLP will need to be restarted for the Remote changes to become active.'))
|
time.sleep(0.5)
|
||||||
|
self.initialise()
|
||||||
|
@ -48,6 +48,7 @@ except ImportError:
|
|||||||
|
|
||||||
IS_WIN = sys.platform.startswith('win')
|
IS_WIN = sys.platform.startswith('win')
|
||||||
|
|
||||||
|
|
||||||
VERS = {
|
VERS = {
|
||||||
'Python': '2.6',
|
'Python': '2.6',
|
||||||
'PyQt4': '4.6',
|
'PyQt4': '4.6',
|
||||||
@ -82,7 +83,6 @@ MODULES = [
|
|||||||
'enchant',
|
'enchant',
|
||||||
'bs4',
|
'bs4',
|
||||||
'mako',
|
'mako',
|
||||||
'cherrypy',
|
|
||||||
'uno',
|
'uno',
|
||||||
'icu',
|
'icu',
|
||||||
'bs4',
|
'bs4',
|
||||||
@ -98,6 +98,7 @@ OPTIONAL_MODULES = [
|
|||||||
|
|
||||||
w = sys.stdout.write
|
w = sys.stdout.write
|
||||||
|
|
||||||
|
|
||||||
def check_vers(version, required, text):
|
def check_vers(version, required, text):
|
||||||
if not isinstance(version, str):
|
if not isinstance(version, str):
|
||||||
version = '.'.join(map(str, version))
|
version = '.'.join(map(str, version))
|
||||||
@ -111,13 +112,16 @@ def check_vers(version, required, text):
|
|||||||
w('FAIL' + os.linesep)
|
w('FAIL' + os.linesep)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
def print_vers_fail(required, text):
|
def print_vers_fail(required, text):
|
||||||
print(' %s >= %s ... FAIL' % (text, required))
|
print(' %s >= %s ... FAIL' % (text, required))
|
||||||
|
|
||||||
|
|
||||||
def verify_python():
|
def verify_python():
|
||||||
if not check_vers(list(sys.version_info), VERS['Python'], text='Python'):
|
if not check_vers(list(sys.version_info), VERS['Python'], text='Python'):
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
|
|
||||||
def verify_versions():
|
def verify_versions():
|
||||||
print('Verifying version of modules...')
|
print('Verifying version of modules...')
|
||||||
try:
|
try:
|
||||||
@ -138,6 +142,7 @@ def verify_versions():
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
print_vers_fail(VERS['enchant'], 'enchant')
|
print_vers_fail(VERS['enchant'], 'enchant')
|
||||||
|
|
||||||
|
|
||||||
def check_module(mod, text='', indent=' '):
|
def check_module(mod, text='', indent=' '):
|
||||||
space = (30 - len(mod) - len(text)) * ' '
|
space = (30 - len(mod) - len(text)) * ' '
|
||||||
w(indent + '%s%s... ' % (mod, text) + space)
|
w(indent + '%s%s... ' % (mod, text) + space)
|
||||||
@ -148,6 +153,7 @@ def check_module(mod, text='', indent=' '):
|
|||||||
w('FAIL')
|
w('FAIL')
|
||||||
w(os.linesep)
|
w(os.linesep)
|
||||||
|
|
||||||
|
|
||||||
def verify_pyenchant():
|
def verify_pyenchant():
|
||||||
w('Enchant (spell checker)... ')
|
w('Enchant (spell checker)... ')
|
||||||
try:
|
try:
|
||||||
@ -160,6 +166,7 @@ def verify_pyenchant():
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
w('FAIL' + os.linesep)
|
w('FAIL' + os.linesep)
|
||||||
|
|
||||||
|
|
||||||
def verify_pyqt():
|
def verify_pyqt():
|
||||||
w('Qt4 image formats... ')
|
w('Qt4 image formats... ')
|
||||||
try:
|
try:
|
||||||
@ -174,22 +181,19 @@ def verify_pyqt():
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
w('FAIL' + os.linesep)
|
w('FAIL' + os.linesep)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
verify_python()
|
verify_python()
|
||||||
|
|
||||||
print('Checking for modules...')
|
print('Checking for modules...')
|
||||||
for m in MODULES:
|
for m in MODULES:
|
||||||
check_module(m)
|
check_module(m)
|
||||||
|
|
||||||
print('Checking for optional modules...')
|
print('Checking for optional modules...')
|
||||||
for m in OPTIONAL_MODULES:
|
for m in OPTIONAL_MODULES:
|
||||||
check_module(m[0], text=m[1])
|
check_module(m[0], text=m[1])
|
||||||
|
|
||||||
if IS_WIN:
|
if IS_WIN:
|
||||||
print('Checking for Windows specific modules...')
|
print('Checking for Windows specific modules...')
|
||||||
for m in WIN32_MODULES:
|
for m in WIN32_MODULES:
|
||||||
check_module(m)
|
check_module(m)
|
||||||
|
|
||||||
verify_versions()
|
verify_versions()
|
||||||
verify_pyqt()
|
verify_pyqt()
|
||||||
verify_pyenchant()
|
verify_pyenchant()
|
||||||
|
@ -7,9 +7,8 @@ from unittest import TestCase
|
|||||||
from tempfile import mkstemp
|
from tempfile import mkstemp
|
||||||
from mock import MagicMock
|
from mock import MagicMock
|
||||||
import urllib.request, urllib.error, urllib.parse
|
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.core.lib import Settings
|
||||||
from openlp.plugins.remotes.lib.httpserver import HttpServer
|
from openlp.plugins.remotes.lib.httpserver import HttpServer
|
||||||
@ -133,6 +132,5 @@ def process_http_request(url_path, *args):
|
|||||||
``*args``
|
``*args``
|
||||||
Some args.
|
Some args.
|
||||||
"""
|
"""
|
||||||
cherrypy.response.status = 200
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user