diff --git a/openlp/core/api/http/server.py b/openlp/core/api/http/server.py index 9d00bbbbb..914ce2278 100644 --- a/openlp/core/api/http/server.py +++ b/openlp/core/api/http/server.py @@ -87,7 +87,7 @@ class HttpServer(RegistryBase, RegistryProperties, LogMixin): Initialise the http server, and start the http server """ super(HttpServer, self).__init__(parent) - if Registry().get_flag('no_web_server'): + if not Registry().get_flag('no_web_server'): worker = HttpWorker() run_thread(worker, 'http_server') Registry().register_function('download_website', self.first_time) diff --git a/openlp/core/api/websockets.py b/openlp/core/api/websockets.py index ea03c0681..d75905000 100644 --- a/openlp/core/api/websockets.py +++ b/openlp/core/api/websockets.py @@ -121,6 +121,6 @@ class WebSocketServer(RegistryProperties, LogMixin): Initialise and start the WebSockets server """ super(WebSocketServer, self).__init__() - if Registry().get_flag('no_web_server'): + if not Registry().get_flag('no_web_server'): worker = WebSocketWorker() run_thread(worker, 'websocket_server') diff --git a/openlp/core/app.py b/openlp/core/app.py index 94ecdb450..9a1f42d9d 100644 --- a/openlp/core/app.py +++ b/openlp/core/app.py @@ -305,7 +305,7 @@ def parse_options(args=None): parser.add_argument('-d', '--dev-version', dest='dev_version', action='store_true', 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('-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 ') parser.add_argument('rargs', nargs='?', default=[]) # 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.setAttribute(QtCore.Qt.AA_UseHighDpiPixmaps, True) application.setAttribute(QtCore.Qt.AA_DontCreateNativeWidgetSiblings, True) - if args and args.portable: + if args.portable: application.setApplicationName('OpenLPPortable') Settings.setDefaultFormat(Settings.IniFormat) # Get location OpenLPPortable.ini