Fix #1385: not check for pyqt if daemon = true set in config

This commit is contained in:
Dmitri Bogomolov 2018-11-04 15:00:27 +02:00
parent 58bc170bda
commit 0e63392ee3
Signed by untrusted user: g1itch
GPG Key ID: 720A756F18DEED13
1 changed files with 4 additions and 2 deletions

View File

@ -181,7 +181,6 @@ class Main:
sys.exit() sys.exit()
elif opt in ("-d", "--daemon"): elif opt in ("-d", "--daemon"):
daemon = True daemon = True
state.enableGUI = False # run without a UI
elif opt in ("-c", "--curses"): elif opt in ("-c", "--curses"):
state.curses = True state.curses = True
elif opt in ("-t", "--test"): elif opt in ("-t", "--test"):
@ -205,7 +204,9 @@ class Main:
os.path.join(app_dir, 'tests', 'apinotify_handler.py') os.path.join(app_dir, 'tests', 'apinotify_handler.py')
) )
# is the application already running? If yes then exit. if daemon:
state.enableGUI = False # run without a UI
if state.enableGUI and not state.curses and not depends.check_pyqt(): if state.enableGUI and not state.curses and not depends.check_pyqt():
sys.exit( sys.exit(
'PyBitmessage requires PyQt unless you want' 'PyBitmessage requires PyQt unless you want'
@ -219,6 +220,7 @@ class Main:
' the new curses interface by providing' ' the new curses interface by providing'
' \'-c\' as a commandline argument.' ' \'-c\' as a commandline argument.'
) )
# is the application already running? If yes then exit.
shared.thisapp = singleinstance("", daemon) shared.thisapp = singleinstance("", daemon)
if daemon: if daemon: