Merge pull request #688 from rubensayshi/curses-without-qt

run -c without python-qt installed
This commit is contained in:
Jonathan Warren 2014-07-16 16:46:11 -04:00
commit a303c8d878

View File

@ -214,15 +214,15 @@ class Main:
singleListenerThread.start() singleListenerThread.start()
if daemon == False and shared.safeConfigGetBoolean('bitmessagesettings', 'daemon') == False: if daemon == False and shared.safeConfigGetBoolean('bitmessagesettings', 'daemon') == False:
try:
from PyQt4 import QtCore, QtGui
except Exception as err:
print 'PyBitmessage requires PyQt unless you want to run it as a daemon and interact with it using the API. You can download PyQt from http://www.riverbankcomputing.com/software/pyqt/download or by searching Google for \'PyQt Download\'. If you want to run in daemon mode, see https://bitmessage.org/wiki/Daemon'
print 'Error message:', err
print 'You can also run PyBitmessage with the new curses interface by providing \'-c\' as a commandline argument.'
os._exit(0)
if curses == False: if curses == False:
try:
from PyQt4 import QtCore, QtGui
except Exception as err:
print 'PyBitmessage requires PyQt unless you want to run it as a daemon and interact with it using the API. You can download PyQt from http://www.riverbankcomputing.com/software/pyqt/download or by searching Google for \'PyQt Download\'. If you want to run in daemon mode, see https://bitmessage.org/wiki/Daemon'
print 'Error message:', err
print 'You can also run PyBitmessage with the new curses interface by providing \'-c\' as a commandline argument.'
os._exit(0)
import bitmessageqt import bitmessageqt
bitmessageqt.run() bitmessageqt.run()
else: else: