Fix the direction of the '--no-web-server' command line option

This commit is contained in:
Raoul Snyman 2018-01-06 21:36:45 -07:00
parent 7b28262987
commit 954d1618bc
3 changed files with 4 additions and 4 deletions

View File

@ -87,7 +87,7 @@ class HttpServer(RegistryBase, RegistryProperties, LogMixin):
Initialise the http server, and start the http server Initialise the http server, and start the http server
""" """
super(HttpServer, self).__init__(parent) super(HttpServer, self).__init__(parent)
if Registry().get_flag('no_web_server'): if not Registry().get_flag('no_web_server'):
worker = HttpWorker() worker = HttpWorker()
run_thread(worker, 'http_server') run_thread(worker, 'http_server')
Registry().register_function('download_website', self.first_time) Registry().register_function('download_website', self.first_time)

View File

@ -121,6 +121,6 @@ class WebSocketServer(RegistryProperties, LogMixin):
Initialise and start the WebSockets server Initialise and start the WebSockets server
""" """
super(WebSocketServer, self).__init__() super(WebSocketServer, self).__init__()
if Registry().get_flag('no_web_server'): if not Registry().get_flag('no_web_server'):
worker = WebSocketWorker() worker = WebSocketWorker()
run_thread(worker, 'websocket_server') run_thread(worker, 'websocket_server')

View File

@ -305,7 +305,7 @@ def parse_options(args=None):
parser.add_argument('-d', '--dev-version', dest='dev_version', action='store_true', parser.add_argument('-d', '--dev-version', dest='dev_version', action='store_true',
help='Ignore the version file and pull the version directly from Bazaar') help='Ignore the version file and pull the version directly from Bazaar')
parser.add_argument('-s', '--style', dest='style', help='Set the Qt5 style (passed directly to Qt5).') parser.add_argument('-s', '--style', dest='style', help='Set the Qt5 style (passed directly to Qt5).')
parser.add_argument('-w', '--no-web-server', dest='no_web_server', action='store_false', parser.add_argument('-w', '--no-web-server', dest='no_web_server', action='store_true',
help='Turn off the Web and Socket Server ') help='Turn off the Web and Socket Server ')
parser.add_argument('rargs', nargs='?', default=[]) parser.add_argument('rargs', nargs='?', default=[])
# Parse command line options and deal with them. Use args supplied pragmatically if possible. # Parse command line options and deal with them. Use args supplied pragmatically if possible.
@ -358,7 +358,7 @@ def main(args=None):
application.setOrganizationDomain('openlp.org') application.setOrganizationDomain('openlp.org')
application.setAttribute(QtCore.Qt.AA_UseHighDpiPixmaps, True) application.setAttribute(QtCore.Qt.AA_UseHighDpiPixmaps, True)
application.setAttribute(QtCore.Qt.AA_DontCreateNativeWidgetSiblings, True) application.setAttribute(QtCore.Qt.AA_DontCreateNativeWidgetSiblings, True)
if args and args.portable: if args.portable:
application.setApplicationName('OpenLPPortable') application.setApplicationName('OpenLPPortable')
Settings.setDefaultFormat(Settings.IniFormat) Settings.setDefaultFormat(Settings.IniFormat)
# Get location OpenLPPortable.ini # Get location OpenLPPortable.ini